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! Request now

Reply
Anonymous
Not applicable

CALCULATE used in True/False expression?

I have used the following to calculate the lower quartile upper value.

 

Percentile = CALCULATE(PERCENTILE.INC(Table1[Ordinary Pay (in the month of April)],0.25),Table1[Ordinary Pay (in the month of April)]<>0,Table1[Ordinary Pay (in the month of April)]<>Blank())
 
It returns a number.
 
The next calculates the amount of values less than 1000.
 
Measure = Calculate(Count(Table1[Ordinary Pay (in the month of April)]),Table1[Ordinary Pay (in the month of April)]<1000)
 
This also returns a number.
 
However, when I join them together by replacing the 1000 with the quartile calculation, I get an error.
 
Measure = Calculate(Count(Table1[Ordinary Pay (in the month of April)]),Table1[Ordinary Pay (in the month of April)]<(CALCULATE(PERCENTILE.INC(Table1[Ordinary Pay (in the month of April)],0.25),Table1[Ordinary Pay (in the month of April)]<>0,Table1[Ordinary Pay (in the month of April)]<>Blank())))
 
Returns an error.
 
Why?
 
 
1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 
Please try

Measur =
VAR X =
    CALCULATE (
        PERCENTILE.INC ( Table1[Ordinary Pay (in the month of April)], 0.25 ),
        Table1[Ordinary Pay (in the month of April)] <> 0,
        Table1[Ordinary Pay (in the month of April)] <> BLANK ()
    )
RETURN
    CALCULATE (
        COUNT ( Table1[Ordinary Pay (in the month of April)] ),
        Table1[Ordinary Pay (in the month of April)] < X
    )

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.