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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors