Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Simple question but i can't seem to get it right.
I have a table with the 12 the month names and their corresponding numbers.
| MonthName | Monthnumber |
| Jan | 1 |
| Feb | 2 |
| Mar | 3 |
etc.
I have a slicer on monthname.
If one of the monthnames is selected i also need to return the previousmonth name in a textfield.
Started with this simple DAX but i am not sure how to return the previous month name?
Returning the previous month number works of course.
PVmonth =
VAR pvmonth1 = SELECTEDVALUE(MonthTitlesUsedInReport[MonthNumber])
VAR pvmonth = pvmonth1 -1
RETURN
???????
Solved! Go to Solution.
Solved it with a lookup value, but i guess there should be an easier way?
PVmonth =
VAR pvmonth1 = SELECTEDVALUE(MonthTitlesUsedInReport[MonthNumber])
VAR pvmonth = pvmonth1 -1
RETURN
LOOKUPVALUE(MonthTitlesUsedInReport[MonthName];MonthTitlesUsedInReport[MonthNumber];pvmonth)
Solved it with a lookup value, but i guess there should be an easier way?
PVmonth =
VAR pvmonth1 = SELECTEDVALUE(MonthTitlesUsedInReport[MonthNumber])
VAR pvmonth = pvmonth1 -1
RETURN
LOOKUPVALUE(MonthTitlesUsedInReport[MonthName];MonthTitlesUsedInReport[MonthNumber];pvmonth)
Hi @Joe_100
There is a simple way
Measure = CALCULATE(MAX(Table1[MonthName]),FILTER(ALL(Table1),[Monthnumber]=MAX(Table1[Monthnumber])-1))
Best Regards
Maggie
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 51 | |
| 45 |