Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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