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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Problem regarding cumulative budget using slicer

I am working on creating a PnL report where I’m showing PnL against budget per month in a bar chart and cumulative PnL against budget in another line chart (separated lines). User has two options by filtering by year and month.

By filtering by month (for example, January - June) I want the result to show for filtered months. But I want the budget graph to show for all 12 months regardless of the month filter. I managed to fix this with in the bar graph, but I’m having problems creating the correct measure showing cumulative budget that exclude the month filter.

Working fine i barchart:

Budget amount = CALCULATE([Budget amount];ALL(Dim_Time[Month]))

Issue in linechart:

Budget accumulated = TOTALYTD(Fact_Budget[Budget amount]; Dim_Time[Date] ; ALL('Dim_Time'))
 

Hope someone can give me an example of measure showing accumulated numbers with filters. Now I have tried everything.

 

 

2019-06-17_22-25-11.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you for your response, but it doesn't cuite answer my question.

Luckily i managed to work around the issue by adding some parameters in the query.

 

Issue is solved.

 

 

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion

Most people would know how to fix this in Excel. In fact if you switch the line chart to a matrix, you would probably immediately know what to do. Just wrap the formula in an if statement.  Check if here are sales this year, and only show the cumulative  total if there are (or what ever it is you are trying to do). It can be a bit more challenging if you data is loaded daily. In that case you need a different approach. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
Anonymous
Not applicable

Thank you for your response, but it doesn't cuite answer my question.

Luckily i managed to work around the issue by adding some parameters in the query.

 

Issue is solved.

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.