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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Problem with using PERCENTILEX.INC

Hello Everyone, 

 

My formula is returning only Q4, or last quarter. I used the formula posted on another forum here, and while I get no errors when inputing in my model, the output is only Q4.

 

Based on the below formula, is the percentilex actually taking where do they fall based on my measure [Customer Invoice Amount] or what am I doing wrong? 

 

For example, I want to categorize my Item number which is stored in table 'Item' according to the measure [Customer Invoice Amount], the lowest quartile, I want it to show Q1, etc 

 

PercentileCategory20 =
VAR LowerMiddle = PERCENTILEX.INC(ALL('Item'[Item Number]), [Customer Invoice Amount], .25)
VAR Middle = PERCENTILEX.INC(ALL('Item'[Item Number]), [Customer Invoice Amount], .50)
VAR UpperMiddle = PERCENTILEX.INC(ALL('Item'[Item Number]), [Customer Invoice Amount], .75)
RETURN
IF([Customer Invoice Amount] < LowerMiddle , "Q1",
IF([Customer Invoice Amount] < Middle , "Q2",
IF([Customer Invoice Amount] < UpperMiddle , "Q3",
IF([Customer Invoice Amount] >= UpperMiddle , "Q4",
"NA"))))
 
Thank you in advance for your help, 
1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Here I create a easy sample to have a test.

RicoZhou_1-1671085642808.png

This measure works in myside.

RicoZhou_0-1671085602789.png

As far as I know, you issue should be caused by data model. You can compare mine with yours and check the reason. If this still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with the result you want.

 

Best Regards,
Rico Zhou

 

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

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.