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
Sammy22
Helper I
Helper I

Table with conditional quartiles

i have a table with discounts for countries. I want to calculate the quartile 1 of the region for the specific product and then the quartile 1 of all the countries regardless of region based on the product. 

 

CountryRegionProductCountry DiscountQ1 RegionQ1 Overall
ChinaEastern AsiaA0.54  
KoreaEastern AsiaB0.52  
JapanEastern AsiaC0.51  
TaiwanEastern AsiaA0.62  
SloveniaSouthern EuropeB0.69  
HungaryEastern EuropeC0.55  
Czech RepublicEastern EuropeA0.49  
PolandEastern EuropeB0.43  
SlovakiaEastern EuropeC0.53  
RomaniaEastern EuropeA0.7  
BulgariaEastern EuropeB0.66  
1 ACCEPTED SOLUTION
Sammy22
Helper I
Helper I

Managed to find a solution. This is calculating the 75th percentile:

 

75th Percentile Discount% = calculate(PERCENTILE.INC('Table'[Country_Discount%] ,0.75),ALLEXCEPT('Table',Table[PRODUCT]))

View solution in original post

4 REPLIES 4
Sammy22
Helper I
Helper I

Managed to find a solution. This is calculating the 75th percentile:

 

75th Percentile Discount% = calculate(PERCENTILE.INC('Table'[Country_Discount%] ,0.75),ALLEXCEPT('Table',Table[PRODUCT]))
Anonymous
Not applicable

Thanks lbendlin for the helpful thoughts.

Hi @Sammy22 ,

 

I'm going to make some additions to yours, here I've created two calculated columns:

Q1 Region = 
CALCULATE(
    PERCENTILE.INC('Table'[Country Discount], 0.25),
    ALLEXCEPT('Table', 'Table'[Region],'Table'[Product]))

Q1 Overall = 
CALCULATE(
    PERCENTILE.INC('Table'[Country Discount],0.25),
    ALLEXCEPT('Table','Table'[Product]))

The result is as follows:

vlinhuizhmsft_0-1724648737935.png

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

Sammy22
Helper I
Helper I

i have a table with discounts for countries. I want to calculate the quartile 1 of the region for the specific product and then the quartile 1 of all the countries regardless of region based on the product. 

 

CountryRegionProductCountry DiscountQ1 RegionQ1 Overall
ChinaEastern AsiaA0.54  
KoreaEastern AsiaB0.52  
JapanEastern AsiaC0.51  
TaiwanEastern AsiaA0.62  
SloveniaSouthern EuropeB0.69  
HungaryEastern EuropeC0.55  
Czech RepublicEastern EuropeA0.49  
PolandEastern EuropeB0.43  
SlovakiaEastern EuropeC0.53  
RomaniaEastern EuropeA0.7  
BulgariaEastern EuropeB0.66
lbendlin
Super User
Super User

You would use PERCENTILEX for that.  Have you tried that?

 

Note that your data is insufficient for this. You need many more datapoints.

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.