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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Begbie
Helper I
Helper I

Returning a value from most recent date

Hi All,

 

Seems to be going round in circles here and I'm sure the expression I'm using isn't quite right to achieve what I am after. I have the below data set:

 

PowerBISnip2.JPG

 

What I am trying to achieve is to get the latest date value, but return "IsCapabilityActivated" to be displayed. This result is then used in a table and a slicer is then used to change the option to be Secure Data, Financial Health etc.. The IsCapabilityActived is a boolean value, so seems the MAX statement cannot be used. 

 

Current statement I have is:

Is Beacon Activated = 
CALCULATE(SELECTEDVALUE(BeaconHistory[IsCapabilityActivated]),FILTER(BeaconHistory,MAX(BeaconHistory[EvaluatedAt])))

This isn't quite giving me the results I require. 

 

Any pointers would be appreciated.

 

Thanks.

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

It looks like you're pretty close with your measure.

 

Does tweaking it like this give you what you expect?

Is Beacon Activated =
CALCULATE (
    SELECTEDVALUE ( BeaconHistory[IsCapabilityActivated] ),
    FILTER (
        BeaconHistory,
        BeaconHistory[EvaluatedAt] = MAX ( BeaconHistory[EvaluatedAt] )
    )
)

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

It looks like you're pretty close with your measure.

 

Does tweaking it like this give you what you expect?

Is Beacon Activated =
CALCULATE (
    SELECTEDVALUE ( BeaconHistory[IsCapabilityActivated] ),
    FILTER (
        BeaconHistory,
        BeaconHistory[EvaluatedAt] = MAX ( BeaconHistory[EvaluatedAt] )
    )
)

😍

 

That only seems to only gone and done it. 

 

From one Alexis to another Alexis, thank you very much!!

Greg_Deckler
Community Champion
Community Champion

@Begbie Seems like Lookup Min/Max like:

Lookup Max Simple = 
    VAR __Table = 'Table'
    VAR __Max = MAXX(__Table,[EvaluatedAt])
RETURN
    MAXX(FILTER(__Table,[EvaluatedAt] = __Max),[IsCapabilityActivated])

You likely need to add some additional filtering criteria, etc. but I'm not sure how you are using or want to use your measure/column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Many thanks for the reply and just tried what you suggested, but returns the error The function MAXX cannot with the values of type Boolean 😔

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.