Forum Discussion
mjanecek
3 years agoHelper I
Need Help with Dax
I have a measure (Avg Premium) that is filtered by month for all of 2022. Here is a visual of the months and that measure. I am trying to write a measure that will allow me to pull...
- 3 years ago
You can use a DAX pattern like this to return your max month in a card visual. Update it with your actual table, column, and measure names.
MaxMonth = VAR vSummary = ADDCOLUMNS ( ALLSELECTED ( 'Date'[YearMonthShort] ), "cQty", [Total Qty] ) VAR vTop1 = TOPN ( 1, vSummary, [cQty], DESC ) RETURN MAXX ( vTop1, 'Date'[YearMonthShort] )Pat
ppm1
3 years agoSolution Sage
You can use a DAX pattern like this to return your max month in a card visual. Update it with your actual table, column, and measure names.
MaxMonth =
VAR vSummary =
ADDCOLUMNS ( ALLSELECTED ( 'Date'[YearMonthShort] ), "cQty", [Total Qty] )
VAR vTop1 =
TOPN ( 1, vSummary, [cQty], DESC )
RETURN
MAXX ( vTop1, 'Date'[YearMonthShort] )Pat
mjanecek
3 years agoHelper I
Thank you so much! This works well.