Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with data with different categories (1, 2,..., n). I managed to calculate the median value for each category with
Measure =
MEDIANX(
KEEPFILTERS(VALUES('Table'[Category]));
CALCULATE(MEDIAN('Table'[Values]))
)
but then when I want to calculate the sum over all categories of those median values I can't manage to achieve it.
Since there is no option on how to aggregate the measure in visuals, I tried defining the sum of those values in different ways, such as the following:
Measure =
CALCULATE(SUMX(Table;
MEDIANX(
KEEPFILTERS(VALUES('Table'[Category]));
CALCULATE(MEDIAN('Table'[Values]))
)))
But it just sums all the values.
Any idea on how to get the sum of the single medians, instead of the median of the medians as a "Total" e.g. in a table view?
TL;DR: how do I get the sum here, instead of median, of the measure?
Solved! Go to Solution.
ok try use
Proud to be a Super User!
Try below and use measure 2 in visual
Measure =
MEDIANX(
KEEPFILTERS(VALUES('Table'[Category]));
CALCULATE(MEDIAN('Table'[Values]))
)
Measure 2=
CALCULATE(SUMX(Table;[Measure]))
Proud to be a Super User!
Hi @FarhanAhmed and thanks for your quick reply. Unfortunately that does the same thing as the second snippet I posted. It just sums all the values.
ok try use
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |