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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.