Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am calculating YES and NO using certain condition and storing in a Variable.
For example, vYesNo = if ( Avg(Total) - Avg(Actual) > 1 , 'YES' , 'NO')
and using the same variable I have to Count a certain dimension. For example:
Count (Materials) where vYesNo = 'YES' (have to use this variable in Set Analysis - HOW?)
Count (Materials) where vYesNo = 'NO' (have to use this variable in Set Analysis - HOW?)
Can someone please help here - How to use the variable in Set Analysis?
Set Analysis deals mainly with fields. If you would have a field F1 with the values YES and NO, you could use your variable to control this like
count({<F1={$(vYesNo)}>} Materials)
but in your case you wouldnt use set analysis and rather somthing like
count (if($(vYesNo)='YES', Materials)
Hi Daniel,
Thanks for some help.
But as, by calculated variable is using Aggregation Function, so using the variable in Count(). is not allowing to do a Nested Aggregation.
Any other help please?
could you describe a bit more the situation (object/dimension/data)? At the moment, I don't consider this as a nested aggregation but a simple condition resulting in true/false. A nested aggregation would be sth like sum(aggr(count...))
ah - I think see what you mean - sorry - I thought you are calculating the variable only once in the script - but its dynamic on the dashboard level
what about
=if($(vYesNo)='YES', count(Materials))
=if($(vYesNo)='NO', count(Materials)) ?
Yes,
I am calculating the variable at script level and using the formula in a Text Object.
But this has not helped either
maybe you should post an example qvw with dummy data and also what result you would expect.
In my case I dont see any problem when creating a dummy by myself.