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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
trentos
New Member

Help with filtering automatically the most recent date

Hi Power BI community, 

 

DAX/power BI newbie here. 

 

I need help with something I am trying to build in DAX for my organisation. 

 

Essentially, I want a dashboard that only shows the most recent date as a filter. The data point I want to show is "lost revenue" which is a calculated measure that uses other created measures to return a value.

 

I have looked around the forums and can see that I can create a column or measure using the MAX function which I have done

 

Most Recent Date Column =
CALCULATE(
    MAX(clogs[Date]),
    ALL(clogs[Date])
)
 
This seems to generate the most recent date as a value for each row - which is what I wanted.. However, I can't seem to use this date to filter against my created measure "lost revenue". Maybe it is the way my data is structured?
 
I thought to use CALCULATE and SUM function for the lost revenue with the recent day measure to filter by only the most recent date however that does not seem to work as I can't sum the lost revenue calculated measure.
 
I want a dashboard guage visually to automatically show the most recent data without having to use the date slicers, so this will update every database refresh - which is daily in my organisation. 
 
As you might be able to already tell, I am still quite inexperienced with this DAX and get confused a lot with the various expressions. Any help would be most appreciated - and apologies in advance if my above question is not clear. 
 
Trent
1 REPLY 1
JW_van_Holst
Resolver IV
Resolver IV

Please provide sample data and expected output (of a downloadable pbix)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors