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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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