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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
AndreiK15
Helper II
Helper II

Get Median Value on each row

Hi,

 

I have the following problem:

 

I need to get median value for Sales Margin Amt so I'm using this formula:

 

v2 Median Margin = MEDIANX(VALUES(fact_sales[Article Id]),[Total Margin Amt])
 
AndreiK15_0-1630955989440.png

I need a formula to return on each row the same value as total (1535.54).

 

I use few calculate measures to do so, but still not working.

 

Sum of Median = CALCULATE([v2 Median Margin], FILTER(ALLSELECTED(fact_sales),fact_sales[Article Id]=MAX(fact_sales[Article Id])))
 
AndreiK15_1-1630956105870.png


Can someone help me with this?

 

Values from Sales Margin Amt and Sales Net Amt are SUM of each Article Code

 

AndreiK15_2-1630956207365.pngAndreiK15_3-1630956222669.png

 

 
Thank you!
1 ACCEPTED SOLUTION
AndreiK15
Helper II
Helper II

Figure it out! So if someone need it, bellow you can find the solution:

 

v4 Median Margin = IF([Total Sales]=BLANK(),BLANK(),MEDIANX(
SUMMARIZE(ALLSELECTED('fact_sales'),fact_sales[Article Id],"MedianValue",[Total Margin Amt]),[MedianValue]))

View solution in original post

1 REPLY 1
AndreiK15
Helper II
Helper II

Figure it out! So if someone need it, bellow you can find the solution:

 

v4 Median Margin = IF([Total Sales]=BLANK(),BLANK(),MEDIANX(
SUMMARIZE(ALLSELECTED('fact_sales'),fact_sales[Article Id],"MedianValue",[Total Margin Amt]),[MedianValue]))

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.