Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
please help me to construct the below set analysis expression-
IF( only(Status) = 'Yes',sum( {<Status = 'Yes'>} 1), sum({<Status='No'>} 1))
the Syntax is not correct
IF( only(Status) = 'Yes',sum( {<Status = {'Yes'}>} 1), sum({<Status={'No'}>} 1))
can you explain more what you want to achieve
Not really sure your requirement is, but may be this:
If(Status = 'Yes', Count(TOTAL {<Status = {'Yes'}>} Status), Count(TOTAL {<Status = {'No'}>} Status))
Hi the syntax nedds the value between {}:
IF( only(Status) = 'Yes',sum({<Status={'Yes'}>} 1), sum({<Status={'No'}>} 1))
That's for avoid the syntax error, but about the logic:
IF( only(Status)= 'Yes' // This check on the current dimension, if all values are 'Yes' it will return "true", for any other cases (all 'No' or a mix of values) it will returns "false"
So if your chart has a dimension with yes and no values it will go to the else and count the 'No'
If you have an Status dimension in the chart you only need an expression like: Sum(1)