The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |