Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Please visit COVID-19 group to keep up the discussion. GO TO GROUP
Not applicable

Create Dimension based on Calculated Measure

In my chart, I calculate a measure. Let's say the calculated measure name is 'Difference' which is populated using the variable v_diff.

Now I want to set flags based on the value of 'Difference'.

I create a new dimension named 'Flag' and put the expression as follows.

if($(v_diff) > 1000, 'Yes','No'). When I complete this, I get the result as invalid dimension. But it works if I define it as measure. Unfortuantely, I want it as only dmension so that I can filter based on the value of 'Flag'.

Is there any way to do this?

1 Reply
MVP & Luminary
MVP & Luminary

Re: Create Dimension based on Calculated Measure

You need to wrap an aggr-function around your calculation, something like this:

aggr(if($(v_diff) > 1000, 'Yes','No'), Dim1, Dim2)

See also: Calculated Dimensions

- Marcus