Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Using this customers table (shown below) and this set analysis ...
((Count({<customers.modified_gender={'Female'}>}customers.modified_gender)) / (count(customers.modified_gender)) * 100)
and a data filter for the same field, I'm getting unexpected results such as 28.8% female when. I'm hoping someone can offer some theories to help get this back on track.
It occurred to me as I was posting this I probably needed to edit the expression and add {1} to the denominator but now the number never changes.
((Count({<customers.modified_gender={'Female'}>}customers.modified_gender)) / (count({1}customers.modified_gender)) * 100)
One last try.
((Count({<customers.modified_gender*={'Female'}>}customers.modified_gender)) / (count(Total {<[customers.modified_gender]=>}customers.modified_gender)) * 100)
Try the below:
((Count({<customers.modified_gender={'Female'}>}customers.modified_gender)) / (count(Total customers.modified_gender)) * 100)
That does seem to give a correct answer and probably the best one we can use. I was expecting that when 1. Nothing was selected it would show that number (the correct percentage)
2. Female was selected it would show 100%
3. Unspecified and/or Male were selected, it would show 0%
etc.
Use the below:
((Count({<customers.modified_gender={'Female'}>}customers.modified_gender)) / (count(Total {<[customers.modified_gender]=>}customers.modified_gender)) * 100)
That appears to be giving the same result as the first one you provided (Thanks BTW!; that gives me a possible way forward). It just never changes with the selection (always the total percentage of females out of the total population). I sort of expected that if I chose male the female % would show 0% and same if I chose "unspecified".
One last try.
((Count({<customers.modified_gender*={'Female'}>}customers.modified_gender)) / (count(Total {<[customers.modified_gender]=>}customers.modified_gender)) * 100)
I am glad it worked out! Cheers!