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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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