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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PowerBIUserX
Frequent Visitor

Solved: Showing Percentile of group in column

Hi all,

 

I have the following table: 

- First 3 columns are data,

- Percentile columns are what I'm trying to calculate. The calculation below is the median for the corresponding group - but I would like to be able to replicate for any percentile.

- The last column is the end goal, comparing if a data point is below, same, or above the percentile of the group.

PowerBIUserX_0-1669276615192.png

How can I create the percentile and comparison columns in PowerBI, using metrics/columns. Do I need to create a calculated table?

 

Thanks in advance!

V

 

 

1 ACCEPTED SOLUTION

Hi @PowerBIUserX ,

 

I create two measeures,the codes are as follows, 

Me-group1 = CALCULATE(MEDIAN('Table'[Value]),'Table'[Group1]=SELECTEDVALUE('Table'[Group1]),ALL('Table'))
 
Me-group2 = CALCULATE(median('Table'[Value]),'Table'[Group2]=SELECTEDVALUE('Table'[Group2]),ALL('Table'))

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-xinruzhu-msft
Community Support
Community Support

Hi @PowerBIUserX ,

 

vxinruzhumsft_0-1669269995595.png

 

vxinruzhumsft_1-1669269995602.png

 

 

This is the median I calculated for each group, whether it meets your needs, I found that the median calculated by the second group is different from the result in the picture you provided, could you provide the calculation logic?

 If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Thank you, this is indeed the calculation I'm looking for. I've updated the table to reflect the correct numbers.

What is the calculations/DAX you used?

Best regards,

V

Hi @PowerBIUserX ,

 

I create two measeures,the codes are as follows, 

Me-group1 = CALCULATE(MEDIAN('Table'[Value]),'Table'[Group1]=SELECTEDVALUE('Table'[Group1]),ALL('Table'))
 
Me-group2 = CALCULATE(median('Table'[Value]),'Table'[Group2]=SELECTEDVALUE('Table'[Group2]),ALL('Table'))

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much!!

amitchandak
Super User
Super User

@PowerBIUserX , is it Percentile  or Avg

 

like a new column

Avg Group 1  = averagex(Filter(Table,[Group 1] = earlier([Group1]) ), [Value])

 

Avg Group 2  = averagex(Filter(Table,[Group 2] = earlier([Group2]) ), [Value])

 

Then you can diff in new columns

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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