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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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