Forum Discussion
homelander123
1 year agoHelper I
Dax Query Not working
CurrentMonthLastYearCount = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthStart = EOMONTH(SelectedMonth, -12) + 1 VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) RETURN CALCU...
- 1 year ago
homelander123 If I understand what you are saying, you could do something like this and put it in a Card visual:
Measure = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) VAR Result = FORMAT( LastYearSameMonthEnd, "mmm yyyy" ) RETURN Result
homelander123
1 year agoHelper I
This works. Thank you so much. Can you please tell me how can i make the name dynamic to the slicer. E.g, if i have selected feb 2025 it should show feb 2024
homelander123
1 year agoHelper I
- Greg_Deckler1 year agoCommunity Champion
homelander123 If I understand what you are saying, you could do something like this and put it in a Card visual:
Measure = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) VAR Result = FORMAT( LastYearSameMonthEnd, "mmm yyyy" ) RETURN Result