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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.