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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
In my date dimension I have a current date set
Ive made a currently month flag from that
Is there any way in M that I can create a flag against last month dates
And then go onto make a flag against the month two months ago?
I did it by copying the column twice and changing them to Month and year.
Anoyingly you cant simply subtract 1 from month because if you are at 12 it has to go back to 1
Any help would be appreciated
Solved! Go to Solution.
Hi @DebbieE ,
check this.
https://docs.microsoft.com/en-us/powerquery-m/date-isinpreviousnmonths
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi @DebbieE ,
check this.
https://docs.microsoft.com/en-us/powerquery-m/date-isinpreviousnmonths
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Unfortunately it hasnt worked
Perfect. Thankyou so much