Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I'm trying to build a self-service tool with three field parameters in a matrix: Row_param, column_param, and measures_param.
All measures work fine except 'Share of Total Patients'. I'm running into issues when my total (the divider) is constantly changing with the selection of parameters. How do I express the total in DAX?
My current measure:
Share of Grand Total (Patients) =
DIVIDE(
[Patients],
CALCULATE(
ALLSELECTED(dim_insurancecompany[name]),
ALLSELECTED(dim_date[week]),
[all other dimensions....],
ALLSELECTED(dim_item[articletype])
))
The columns in ALLSELECTED are the same as in my row and column parameters. I would like it to be calculated per column level. I've tried enabling that setting in the Power BI visual, but nothing happens. What am I doing wrong?
Current output:
Solved! Go to Solution.
@eaj , Nor very clear, Try like
Share of Grand Total (Patients) =
DIVIDE(
[Patients],
CALCULATE([Patients], allselected() ))
Im sorry for beeing unclear. I'll try again. I'm using this messure (full version):
The math is not incorrect, but I would like it to show the share between categories on column-basis. So each column sum to 100%. Right now the entire matrix sum to 100%.