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.
I am looking into getting help in building my calender tabel for my dashboard. So, I did start by creating it but I failed to know the syntax for creating a " Previous YearMonth" and PreviousYearQuarter".
I currently created a Calender Table from Jan 2017 till Oct 2022 within my fields pane.
Can someone help me in providing a syntax for a complete Calender table that includes Date, Month, Year, Quarter, MonthYear, QuarterYear, MonthQuarter, PreviousQuarterYear, PreviousMonthYear, Previous MonthQuarter precisely.
Thanks in advance.
Solved! Go to Solution.
Previous month = format(eomonth([Date],-1), "mmm-yyyy")
Previous year month = format(eomonth([Date],-12), "mmm-yyyy")
Previous year = format(eomonth([Date],-1*month([Date]) ), "yyyy")
Previous Qtr same month = format(eomonth([Date],-3), "mmm-yyyy")
Previous Qtr = format(eomonth([Date],-3), "Q-yyyy")
But in case you want to compare data use time intelligence
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Thanks Amit, just made it right! Much appreciated.
Previous month = format(eomonth([Date],-1), "mmm-yyyy")
Previous year month = format(eomonth([Date],-12), "mmm-yyyy")
Previous year = format(eomonth([Date],-1*month([Date]) ), "yyyy")
Previous Qtr same month = format(eomonth([Date],-3), "mmm-yyyy")
Previous Qtr = format(eomonth([Date],-3), "Q-yyyy")
But in case you want to compare data use time intelligence
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA