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
astano05
Helper III
Helper III

Use Date Value in a Measure

I have a database then is updated daily Mon-Sat (not Sunday). 

I have this measure to get the last updated date: Last Update = SWITCH (weekday(today(),2) ,1,today() -2, today()-1)

 

I also have a Calendar table. I need to create a True/False measure for If( Date Value = Last Update, True, False) so I can use it as a filter to dynamically pull daily sales from the last updated date, but I am unable to use the Date Value field without an aggregator function for the measure. 

 

How can I accomplish this? If i need an aggregator function on date value, which do I use? 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@astano05 - Generally MIN or MAX but I'm not sure I am visualizing your data correctly.



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...

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@astano05 , not very clear you can have a column like this in your date table

 

switch( true(),
[date] =max(Table[last update at]) ,"Last Updated",
[Date]& ""
)

 

Sort it on a date and use in filter

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@astano05 - Generally MIN or MAX but I'm not sure I am visualizing your data correctly.



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...

that worked thank you!! 

 

I now have the measure as TRUE on the correct date. However, I'm now realizing that I can't pull the measure in as a slicer or as a filter on the table. Is there anything I can do to filter the table for only the TRUE value without creating it as a column? (I cannot create columns in this database due to org security reasons)

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors