# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for
Did you mean:
Contributor III

## sum with Total and dimensionality

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.

Labels (5)

• ### Visualization

Champion III

Try below, to evaluate string returned as a field

=sum(Total < \$(=\$(variable1)), [Fiscal Year] > {<[FLAG]={1}>} Value)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Tags
Community Browser