Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am having an issue with one of my trellis pie charts in my application.
I have a trellis chart with pie charts with a secondary trellis dimension. I am carrying out a calculation under my expressions which will calculate the percentage.
So I have the expression COUNT(DISTINCT ID) / COUNT(TOTAL DISTINCT ID)
In the trellis pie chart, I am using three dimensions; Hotel, Flag and Grade.
I want to split the pie chart between two Grade values; Negative and Positive broken down by the Hotel and the Flag.
I want to be able to get the pie charts to equate to 100% all the time whenever you made a selection.
At the moment I am getting incorrect percentages which are not equating to 100%. Find below the screenshot.
As you can see the pie charts are not equating to 100%. I want them to equate to 100%
Am I doing something incorrect in my expression?
Is this possible to do?
Thanks
COUNT(DISTINCT ID) / COUNT(TOTAL <Hotel, Flag> DISTINCT ID)
May be as below:
COUNT(DISTINCT ID) / COUNT(TOTAL DISTINCT ID)
Hi
Thanks for your reply.
When I use the expression you suggested, I get the following result:
Any ideas?
Thanks
Try just using the hotel dimension in the TOTAL expression
COUNT(DISTINCT ID) / COUNT(TOTAL <Hotel> DISTINCT ID)
There also an issue for DISTINCT in numerator and not in denominator
Your right Sunny, the position of the DISTINCT is incorrect
COUNT(DISTINCT ID) / COUNT(DISTINCT TOTAL <Hotel> ID)
My bad, I didn't see that it was there .
Does the position really matter?
Not sure if the position is critical, but the expression help does show DISTINCT before TOTAL.
That did not work. Still did not equate to 100% on each pie chart in the trellis chart.