Forum Discussion
Using MAX to get most recent data
- Anonymous4 years ago
Hi SandeA ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can update the formula of measure [FilenameDB6Size] as below:
FilenameDB6Size = VAR _selfilename = SELECTEDVALUE ( Database6[FileName6] ) VAR _maxdate6 = CALCULATE ( MAX ( Database6[Date6] ), FILTER ( ALLSELECTED( Database6) , Database6[FileName6] = _selfilename ) ) RETURN CALCULATE ( MAX ( Database6[Size6] ), FILTER ( Database6, Database6[Date6] = _maxdate6 ) )If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Change it to
FilenameDB6Size = CALCULATE (SUM(SIZE6), Database6[Date6] = MAX (Database6[Date6] )
Additionally you could filter the data in Power Query to pull in only the most recent date if you didn't need the historical data.
on another note, (pardon my ignorance here), I hear alot about Power Query, but have no idea how to access it. I've looked all over my desktop version of Power BI and can't see anything other than the Filters pane
- claymcooper4 years agoResolver II
Click the Transform Data button in the top ribbon. That opens Power Query