Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have data that looks like this:
Its a row for every user in my clinical trials system, what their contact id is, and what department they're in.
I also have other data that is a row for every protocol we're tracking, one column of which is what department that protocol is in.
I'd like to create a visual like this (pictured, though not working perfectly yet), where I select a study, it shows what department that study is in, and then a pie chart that would show: "of the 821 total users, 328 of them are in that department"
It ALMOST works. All the data is linked to each other, and if I select a different dept the pie chart will change to reflect the users in that department, the problem is it doesn't keep the 'out of 821' as a total. The entire pie chart just becomes however many rows are in that department.
How do I get the pie chart to show percent of total rows?
Solved! Go to Solution.
Hi @JoeCrozier ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTCOLUMNS('Table',"1",[Department])
var _all=COUNTX(ALL('Table'),[User])
var _group=COUNTX(FILTER(ALL('Table'),'Table'[Department] in _select &&'Table'[Department]=MAX('Table'[Department])),[User])
return
DIVIDE(
_group,_all)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @JoeCrozier ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTCOLUMNS('Table',"1",[Department])
var _all=COUNTX(ALL('Table'),[User])
var _group=COUNTX(FILTER(ALL('Table'),'Table'[Department] in _select &&'Table'[Department]=MAX('Table'[Department])),[User])
return
DIVIDE(
_group,_all)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
61 |
User | Count |
---|---|
199 | |
120 | |
110 | |
79 | |
69 |