How are filters applied?

I have a datacube, reading from Postgres via the builtin Postgres connector. This cube has a few dimensions, a few of them are promoted to some hierarchies I built.

The cube has a few million rows. It will be displayed on a table after adding some formulas.

There is a filter in my dashboard, properly bound to the table and then to the cube.

Looking at the query sent to Postgres, when a filter is applied, I see a kind of select *, without any filter applied at the SQL level. Is that how it is supposed to work? Dundas pulls millions of rows and then filters them in memory, or is there something I missed? The box ‘enable subquery optimisation’ is properly ticked.

I am a tad confused because if the filter is not sent to SQL, my dashboard will basically not work.

Cheers,

1 Like

Hello,

If you filter from the dashboard, you are filtering only the information which is inside the dashboard, NOT the cube.
If you want to filter your data from the cube, inside the manual select, you must use the placeholders for the where clause.

Thanks Costin, that was my understanding but not what I hoped to hear :slight_smile: I actually seemed to remember that Dunda was smarter than that.

1 Like

This might be helpful to you,

https://www.dundas.com/support/learning/documentation/cleanse-consolidate-modify-data/how-to/passing-parameter-value-from-dashboard-to-stored-procedure

I think there is a similar thing for passing then to query parameters but I woke up early this morning and I am not fully awake yet.

Thanks James, it would and does work indeed, but I hoped to have a more generic way. It looks like what I want is not possible.