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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
OK - I need to get the number of the previous month as an integer.
I currently get teh current month using:
MONTH(NOW())
but I cannot simply subtract 1 as if the current month was January (ie. 1) then the previous month would come out as 0 instead of 12 (december).
Any thoughts?
Solved! Go to Solution.
actuaylly just came up with this - is this OK?
test = IF(Month(NOW())>1,MONTH(NOW())-1,12)
@Anonymous,
You may use DAX below as well.
m = MONTH ( TODAY () - DAY ( TODAY () ) )
actuaylly just came up with this - is this OK?
test = IF(Month(NOW())>1,MONTH(NOW())-1,12)
@Anonymous,
You may use DAX below as well.
m = MONTH ( TODAY () - DAY ( TODAY () ) )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |