Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
marcus_sommer

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