Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello Gurus,
In need of some assistance in displaying months with MoM variance - my months are, July - Dec 2019 and Jan 2020. With doing this it is now displaying January as the earliest date due to not displaying the year.
Any support, greatly appreciated.
With a date calendar, you can use these kind formula's to get a variance
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Sort column for the month is
Month Sort = format(Date[date],"YYYYMM")
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Thank you for response - did try all sort by options and no luck
Appreciate your measure to give that try
Hi @RobHel33 ,
Have you resolved the problem? If yes, please mark the helpful answers as solutions. If not, maybe you could reference the video to have a try.
Sort month name chronologically in Power BI Desktop
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Use the below measure and then sort your month column by that:
@RobHel33 generally with month names you create a "Month Sort" column that is simply MONTH('Table'[Date]). You then click on your Month column and use the Sort By function in the ribbon to sort by your numeric Month Sort column.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
84 | |
76 | |
65 |
User | Count |
---|---|
146 | |
109 | |
109 | |
102 | |
96 |