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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Need help with one of my first DAX queries. I think it is easy.

I am trying to write a DAX query to get the value for a member, from a Dimension.  The Dimension is called AllYears and has two members.  I want to get the first or last memeber.  In my senerio the Column name is CurrentDay.  This value has the date or data was last run.  So I will use on reports to show how current the data is.  I inherited the model, so can't really change it.

 

This returns both values...  Evaluate(values( 'AllYears'[CurrentDay])).   But I only want "09/05/2019"

 

Any help appreciated,

Capture.PNG

Mike

1 REPLY 1
Anonymous
Not applicable

This works...    

EVALUATE
(LASTNONBLANK('AllYears'[CurrentDay],[CurrentDay] )
)

 

But Id almost rather filter out the non date values...   so was trying this, but its not working.

 

EVALUATE
(
CALCULATE (
    FIRSTNONBLANK ( 'AllYears'[CurrentDay],[CurrentDay]  ),
    FILTER ( ALL ( 'AllYears' ), 'AllYears'[CurrentDay] <> BLANK () )
 )
)

 

 

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.