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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.