Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In this case I want to find the date of the Max value of a Sum agregation.
In my example DevAdvance = Sum(Development[ADVANCE]) and the DateKey is from a Calendar table
I can see that the Max DevAdvance was on the 11-Apr-20 how can I return that date?
Solved! Go to Solution.
Not sure what context you are going to use this measure, but you could try an approach like this.
Date with Max =
VAR __summary =
ADDCOLUMNS ( VALUES ( 'Calendar'[DateKey] ), "@DevAdvance", [DevAdvance] )
VAR __maxdevadv =
MAXX ( __summary, [@DevAdvance] )
VAR __filtered =
FILTER ( __summary, [@DevAdvance] = __maxdevadv )
RETURN
MAXX ( __filtered, 'Calendar'[DateKey] )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Not sure what context you are going to use this measure, but you could try an approach like this.
Date with Max =
VAR __summary =
ADDCOLUMNS ( VALUES ( 'Calendar'[DateKey] ), "@DevAdvance", [DevAdvance] )
VAR __maxdevadv =
MAXX ( __summary, [@DevAdvance] )
VAR __filtered =
FILTER ( __summary, [@DevAdvance] = __maxdevadv )
RETURN
MAXX ( __filtered, 'Calendar'[DateKey] )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Works perfectly thank you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |