Forum Discussion
Report Page Tooltip - help with measures
Hello all,
I have a table full of people date, and one column is generation group (e.g. Baby Boomers, etc). I then have a small table defining the generation groups and have a relationship between it and the main dataset.
I have a donut chart which shows the count & percentage of people by generation. There's a mapping table for generation that I am using, so on the the donut chart, I am actually using the column from the mapping table. The mapping file has a relationship between it and the main dataset (called HEADCOUNT).
I am really liking the new report page tooltips, so I built one. To maintain the previous functionality, I included a measure for count. The other measure that needs to be included to maintain functionality is percentage. The problem is that i can't craft a measure that shows percentage in all cirumstances.
For example, neither of these work and will always display 100%,
Tooltip Percent = HEADCOUNT[count]/CALCULATE(HEADCOUNT[count],all(HEADCOUNT[Generation]))
Tooltip Percent = HEADCOUNT[count]/CALCULATE(HEADCOUNT[count],all('Mapping - Generation'[Generation]))
I have another donut chart for Gender, but I don't use a mapping file or a relationship. The Legend is just the Gender column from the HEADCOUNT dataset.
This measure works fine:
Tooltip Percent = HEADCOUNT[count]/CALCULATE(HEADCOUNT[count],all(HEADCOUNT[Gender]))
I've had this problem before, where I simply cannot get calculate to behave as I want it to because of relationships. In the above example, I want the denominator to count everyone and ignore any filters applied to Generation. But the filter is actually applied to a column in a related table, and it is not ignored and I get 100% every time.
1 Reply
- AnonymousNot applicable
Anonymous,
Coudld you please share dummy data of the above mentioned tables and show relationships among them?
Regards,
Lydia