Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
powerbiss
Helper I
Helper I

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.

 

powerbiss_1-1641724917973.png

 

 

2 ACCEPTED SOLUTIONS
ALLUREAN
Solution Sage
Solution Sage

Hi, @powerbiss 

 

Please check this example:

https://www.dropbox.com/s/rgbhppu8b3x13r5/Dynamic%20Monthly%20Sales%28allure-analytics.com%29.pbix?d...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

ryan_mayu
Super User
Super User

@powerbiss 

pls see the attachment below

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@powerbiss 

pls see the attachment below

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hey Ryan,

This is awesome. Have been struggling to get the previous months data and the title

 

Really appreciate your help.

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ALLUREAN
Solution Sage
Solution Sage

Hi, @powerbiss 

 

Please check this example:

https://www.dropbox.com/s/rgbhppu8b3x13r5/Dynamic%20Monthly%20Sales%28allure-analytics.com%29.pbix?d...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




TomMartens
Super User
Super 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.



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.