Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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)
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)
You may use DAX below as well.
m = MONTH ( TODAY () - DAY ( TODAY () ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |