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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have created a measure to calculate the median of a set of values per sub-category.
I would like to now have the min. of the medians of those sub-categories - example below.
Any idea how I can achieve this in Power BI w/DAX?
Thank you.
FYI - Tried this method but not returning the desired values:
Measure 2 =
Calculate(
MINX(Test,[Measure]),
ALLEXCEPT(Test,Test[Category])
Solved! Go to Solution.
I've resolved by adding on:
Hi @TM_ - Create a measure to calculate the median for each subcategory
Median_Per_Subcategory =
MEDIANX(
FILTER(
Test,
Test[Sub Category] = MAX(Test[Sub Category])
),
Test[Value]
)
you can create another measure to calculate the minimum of the medians for each category:
Min_Of_Medians =
MINX(
SUMMARIZE(
Test,
Test[Sub Category],
"Median", [Median_Per_Subcategory]
),
[Median]
)
Now, you can add the Min_Of_Medians measure to your visual or card to display the desired minimum of the medians for each category.
This approach should return the expected values you highlighted in the Expected Value column (e.g., 2 for Category A, 8 for Category B, and 14 for Category C).
Proud to be a Super User! | |
Hi @rajendraongole1 - many thanks for your reply!
How do I amend to make it so that the Min_Of_Medians will show up as:
- 2 consistently for Category A, Sub-Categories a,b,c rather than 2,4,6.
- 8 consistently for Category B, Sub-Categories a,b,c rather than 8,10,12.
- 14 consistently for Category C, Sub-Categories a,b,c rather than 14,16,18.
My end goal here is to then use the Min_Of_Medians measure as a conditional formatting tool to colour the minimum value in the Median_Per_Subcategory per Category. Essentially the below:
Thank you.
I've resolved by adding on:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 41 | |
| 20 | |
| 18 |