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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Allan77R2V1
Helper II
Helper II

Graph for current month and the previous 12 months of costs

I have a simple tables that has Month, Year and monthly costs for the last 4 years. I want to create a bar graph that automatically shows the current months total and the previous 11 months. The bar graph will show the monthly cost for each of these months.

 

Im sure Im just missing something but I can not figure out how to make this happen automatically based on todays date. Any ideas?

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Allan77R2V1 ,

 

If you follow the post below you can use a similar approach.

 

http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-powe...

 

On the attach PBIX file I have made a simple table and it's a calendar table but you can change to todays, as you can see I have two measures the one that is called Costs- Last 12 months today is changing on the calendar date, the other is based on the slicer on the report.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Allan77R2V1 ,

 

If you follow the post below you can use a similar approach.

 

http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-powe...

 

On the attach PBIX file I have made a simple table and it's a calendar table but you can change to todays, as you can see I have two measures the one that is called Costs- Last 12 months today is changing on the calendar date, the other is based on the slicer on the report.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Awesome, thank you, that indeed did solve my issue. Much appreciated. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.