Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to calculate the percentage for a Dimension (M/F). When the Gender Dimension is selected in the Filter the result from the calculation is wrong (weird). Obviously my expression is wrong.
= Count({$< Gender = {"M"}>} SalesOrderNumber)/ Count( SalesOrderNumber)
When the Female Gender is selected the % Male calculation is expected to be zero. That is what I am expecting.
How to get that?
Attaching the file.
Thanks
ignore the Gender dimension in the denominator. if you dont you are dividing male count/female count
Count({$< Gender = {'M'}>} SalesOrderNumber)/ Count( {$< Gender = >} SalesOrderNumber)
Count({$< Gender = {'F'}>} SalesOrderNumber)/ Count( {$< Gender = >} SalesOrderNumber)
Why the filter is not getting rid of the filtered dimension?
If I select M in the filter, I was thinking the Female records will be filtered out and the percentage will either dissappear or become zero.
With old or new?. New one I shared ignored gender selection for the denominator
May be you need these expressions
= Count({$< Gender *= {"M"}>} SalesOrderNumber)/ Count({<Gender>}SalesOrderNumber)
= Count({$< Gender *= {"F"}>} SalesOrderNumber)/ Count({<Gender>}SalesOrderNumber)
You can try something like this:
= Count({$< Gender = {"M"}>} SalesOrderNumber)/ Count(TOTAL SalesOrderNumber)
= Count({$< Gender = {"F"}>} SalesOrderNumber)/ Count(TOTAL SalesOrderNumber)