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

Error in calculated dimension formula but output is correct.

Hi,

I am trying to use a calculated dimension to switch dimensions based on if there has be more that 1 selection.

But I am getting an error in the calculated dimension, but I write the formula in the caption it returns the correct dimension.

 

 

=

if(substringcount(concat(DISTINCT [Issue - Location],','),',')>0,[Issue - Locationfull],[Issue - Location])

Thanks.

4 Replies
pokassov
Specialist
Specialist

Hi!

If you want to use expression as a calculated dimension you have to add aggr(your_experssion, dimensions)

Where dimensions are used to slice your expression

tinkerz1
Creator II
Creator II
Author

Like this, I dont quite understand

 

=

if(substringcount(concat(DISTINCT [Issue - Location],','),',')>0,aggr(DISTINCT[Issue - Locationfull],[Issue - Locationfull]),aggr(DISTINCT [Issue - Location],[Issue - Location]))

pokassov
Specialist
Specialist

I started write this:

aggr(if(substringcount(concat(DISTINCT [Issue - Location],','),',')>0,[Issue - Locationfull],[Issue - Location]), [Issue - Location],[Issue - Location]))

but I don't get the whole goal....

if(isnull([Issue - Location]), [Issue - Locationfull], [Issue - Location])

tinkerz1
Creator II
Creator II
Author

Thinking about it I just need if this list is selected then use it, if not use the other list as a dimension