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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi folks,
i have a question about slicers and the function „previousmonth“. I calculated flexitime (starts in 2003 until today). I use a date slicer, which shows date from (2003-01-01) until date (2019-11-15). I would like to see flexitime at the same date just the previous month (2019-10-15).
I tried this measure:
Flexitime last Month = CALCULATE([Flexitime];PREVIOUSMONTH(Kalender[Datum])
Unfortunately I get a empty column.
Does anybody can help me?
Thanks for your help
freiburgc
Solved! Go to Solution.
Thanks for your answer @RobbeVL!
I found an answer:
Flextime last month =CALCULATE([flextime];DATEADD(Calendar[Date];-1;MONTH))
Hi,
When you use PREVIOUSMONTH, it actually returns the value of the complete previous month.
The function Previousmonth on a day level does not exist. This is because the different of numbers of days per month differs.
What is your expected output wheb you want last month of 30/03/2019
Also I dont know what your data is about, but comparing the monthnumbers is usually not very insightfull.
Try having a look at weeknumbers ?
Although it is not impossible to create what you requested.
Have a look here:
https://community.powerbi.com/t5/Desktop/PREVIOUSMONTH/td-p/13307
Thanks for your answer @RobbeVL!
I found an answer:
Flextime last month =CALCULATE([flextime];DATEADD(Calendar[Date];-1;MONTH))