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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
JojoPBI
New Member

Use a measure in a measure

Hello,

 

I got what I think is a fairly simple need, but I can't figure out how to do it as I'm pretty new with Dax.

I have added a Measure in a dataset (which is a single value, a Max()), and I want to use it as a filter condition in another measure. Something like that :

measureB = CALCULATE(MAX(dataset[column]),dataset[column] < measureA))
 
For what I understand, it's not possible to use a measure here (getting a A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression error), so I'm trying to do something like this :
measureB = CALCULATE(MAX(dataset[column]),FILTER(dataset, [column] < measureA))) but it seems that the MAX is evaluated first as it returns null.
 
What's the syntax for that need?
 
Thank you
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

try 

measureB =
CALCULATE (
    MAXX ( FILTER ( dataset, dataset[column] < [measureA] ), dataset[column] )
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

try 

measureB =
CALCULATE (
    MAXX ( FILTER ( dataset, dataset[column] < [measureA] ), dataset[column] )
)

Exactly what I needed, thanks a lot!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors