Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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%.
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
49 | |
46 |