If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi guys,
I have a variable that returns the dimensionality and the respective Dimension, and I need to include this in the set analysis measure.
variable1 ( return dimensionality:
If(Dimensionality() = 1,'DIMENSION_1',
if(Dimensionality()=2,'DIMENSION_2'))
measure
sum(Total < $(variable1), [Fiscal Year] > {<[FLAG]={1}>} Value)
But I get the error:
Error in expression: '>' expected
sum(Total < If(Dimensionality() = 1,'DIMENSION_1',if(Dimensionality()=2,'DIMENSION_2')), [Fiscal Year] > {<[FLAG]={1}>} Value)
expected variable1 result
sum(Total < 'DIMENSION_1', [Fiscal Year] > {<[FLAG]={1}>} Value)
or
sum(Total < DIMENSION_2', [Fiscal Year] > {<[FLAG]={1}>} Value)
depends of dimensionality rows number
How can I solve this?
I tried
sum(Total < $(=$=(variable1)), [Fiscal Year] > {<[FLAG]={1}>} Value)
sum(Total < $=(variable1), [Fiscal Year] > {<[FLAG]={1}>} Value)
I think the problem is in the evaluate variable1, but I am not getting the correct result.
Try below, to evaluate string returned as a field
=sum(Total < $(=$(variable1)), [Fiscal Year] > {<[FLAG]={1}>} Value)