Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Jsobrinho77
Creator
Creator

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)
1 Reply
vinieme12
Champion III
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.