Forum Discussion
Dynamic Monthly Sales
Hi guys,
I am trying to compute current month sales, and also get the last two previous months. Is it possible to show the months change dynamically. Example if this Feb 2022. then cards should show Feb-2022, Jan-2022, and Dec-2021. Sorry I couldnt find how to attach the excel file with the data. See below screenshot for the desired output. Thanks for all your help. Really appreciate it.
Hi, powerbiss
Please check this example:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
5 Replies
- TomMartensSuper User
Hey powerbiss ,
this article contains almost everything you need to tackle your challenge: https://www.daxpatterns.com/time-patterns/
First create a calendar table and relate the table with your date column.
Then create three measures calculate the sales, the first is filtered by the max available month, the 2nd is filtered by the max available month - 1
Hopefully, this provids what you are looking for.
Regards,
Tom
P.S.: The ideal way to share your data, is uploading the pbix file to onedrive or dropbox and share the linkl. If you are using Excel to create the sample data instead of the manual input method, share the xlsx as well.
- ALLUREANSolution Sage
Hi, powerbiss
Please check this example:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
- ryan_mayuSuper User