Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PawelWitecki
New Member

Median on the top of measure

Hi, I have the table with columns: country, week, day, status, order and measure with share of orders in each of statuses. I need to calculate 1) the share for every country/week, then a median of shares per country, and have it in dashboard for every country/week level; 2) the share for country, then a total median of those shares, and have it in dashboard for every country level. It will be used for conditional formating to compare for upper-level median: country/week share vs country median and country share vs total median.

 

I was able to calculate 1) using MEDIANX at the country/day level but I have separate tables for country and day. Is it possible to calculate it for country/week without creating week table?

 

How to calculate 2) total median from country level aggregation? MEDIANX won't help here as there is no iteration. And MEDIAN isn't working on measure.

2 REPLIES 2
daXtreme
Solution Sage
Solution Sage

To caclulate over weeks you have to have a calendar with defined week, easy as that. To calculate median you have to have data points to calculate it from. What does it mean "total median from country level aggregation"? A median is the middle value of some observations. Therefore, where there are observations (it better be more then 1!), there is a median. The median of 1 observation is just this observation (not very useful, though). If you want to calculate a median from a measure, you have to be able to say what you're going to iterate the measure over. Without this, the operation loses any meaning.

tamerj1
Super User
Super User

Hi @PawelWitecki 
Would you please include some screeschots, a sample data and the expected results for better understanding of the problem?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.