Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I am working on a measure to calculate the average of the previous 3 months' sales. I figured this out for months that are all in the same year, then I realized that in January the measure wouldn't work. Currently I calculate 3 measures for Month-1, Month-2, and Month-3, and then add them up and divide by 3 to get the average. Here is what Month-2 looks like (the other 2 measures are the exact same just different offsets of the month):
Solved! Go to Solution.
Hi, @sjpusat16
use EDATE dax func.
for example,
RollingCalendar[Month] = MONTH(EDATE(TODAY(), -2)),
RollingCalendar[Year] = YEAR(EDATE(TODAY(), -2))
refer to this doc: https://learn.microsoft.com/en-us/dax/edate-function-dax
Proud to be a Super User!
Hi, @sjpusat16
use EDATE dax func.
for example,
RollingCalendar[Month] = MONTH(EDATE(TODAY(), -2)),
RollingCalendar[Year] = YEAR(EDATE(TODAY(), -2))
refer to this doc: https://learn.microsoft.com/en-us/dax/edate-function-dax
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |