Forum Discussion
lasmithfla
4 years agoHelper I
Need help pulling Max date based on a measure
I don't know how to attach the sample powerbi file that I made up for this example; I can't post real data. I'm able to identify the max sales but need to be able to also extract the date of the ...
- Anonymous4 years ago
HI lasmithfla,
You can try to use summarize and max functions to achieve your requirement:
MaxSales = VAR summary = SUMMARIZE ( ALLSELECTED ( SalesTable ), [Date], "Total", SUM ( SalesTable[TotalSales] ) ) RETURN MAXX ( FILTER ( summary, [Total] = MAXX ( summary, [Total] ) ), [Date] )Regards,
Xiaoxin Sheng
Anonymous
4 years agoNot applicable
HI lasmithfla,
You can try to use summarize and max functions to achieve your requirement:
MaxSales =
VAR summary =
SUMMARIZE (
ALLSELECTED ( SalesTable ),
[Date],
"Total", SUM ( SalesTable[TotalSales] )
)
RETURN
MAXX ( FILTER ( summary, [Total] = MAXX ( summary, [Total] ) ), [Date] )
Regards,
Xiaoxin Sheng