Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am using the below formula for calculating the percentage in a bar chart ,
Count(distinct(Col1)) / Count(Total<DIM1>distinct Col1)
i need to include an if condition in the above expression to get just ACTIVE Col 1 values
somthing like Count(if(Col2 ='ACTIVE', distinct(Col1) / Count(If(Col2 = 'ACTIVE',.total<.... but not sure how to include this in the total ...
Can someone please help ?
Thanks
You can try a set expression:
Count({<Col2 = {ACTIVE}>} distinct(Col1)) / Count({<Col2 = {ACTIVE}>} Total<DIM1>distinct Col1)
or with an if():
Count(distinct if(Col2='ACTIVE',Col1)) / Count(Total<DIM1> distinct if(Col2='ACTIVE',Col1))