Hey, thanks for the reply!
You used the same approach, and your result shows the same problem. I'm looking for a way to display a ratio of those two fields.
Using my data the ratio is 50/93 = 0.53, so I expected half of the pie orange, not only one third.
With your data, the case to alert ratio is 50/43 = 1.16 or 116%, so I expected the pie to be completely orange.
Is there any other approach to displaying the ratio between to measures in a pie chart?
In my scenario Case has the colour green
When I "hover" over the green part (>50%) it gives me Case 50
When I "hover" over the orange part (<50%) it gives met Alert 43
PS your approach is "slighthly" different to my approach
Your "Measure Values" is 143 mine is 93
Your "Measure Values" are AGG(XXX) mine SUM(XXX)
1 of 2 people found this helpful
Is that what you wanted?
Create a cacl field using below mentioned formula. Then drag the field as per above instructions.
Alert Ratio %:
IF ATTR([status])='Case' THEN SUM([Number of Records])/TOTAL(SUM([Number of Records]))
ATTR([status])='Alert' THEN SUM([Number of Records])/TOTAL(SUM([Number of Records]))
Compute using Status.
Let me know If this help.
Thanks for your reply, Mahfooj! Your approach is interesting, but I don't know how I could apply it to my problem, given that the two measures aren't related; they are two COUNTD on two measures.
Thanks for your reply, Jiayi! Your approach is interesting, but I don't know how I could apply it to my problem, given that the two measures aren't related; they are COUNTD on two measures. I don't have anything similar to the 'status' you applied to the color shelf, and I'm not sure how I could filter the 'number of records' to count only the two relevant measures.
In case anyone else has the same problem:
- create a calculated field named 'ratio' for the percentage: COUNTD([Case Id])/COUNTD([Alert Id])
- create another calculated field named 'complement' for the complementary percentage: 1 - [ratio]
- drag 'Measure Values' to the Size shelf and remove all but the two field created above
- drag 'Measure Names' to the Color shelf