Dimension filters on measures

Sometimes it is useful to present a master measure filtered by another dimension as a new dimension.

E.g. Orders > Orders (Online), Orders (First)

In SQL this can be achieved using a case statement, however if we use a case statement in the Measure definition in Holistics, then the query will fail unless that dimension is explicitly included in the analysis.

In order to get around this, I’ve been creating hidden dimensions which apply the case statement and then building the measure off of these, however this creates extra redundant dimensions.

It would be handy therefore to be able to specify a filter dimension and value.

Hi @Alex_H , could you share more about the error and what have you been trying so far with this approach?

Is the below syntax is what you are using to include case when statement in the Measure?

count(case when model.field = 'abc' then 1 else null end)