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
Raph
Helper III
Helper III

Removing month filter on YTD calculation

Hello,

 

Let's say I have a simple model like this : 

 

Raph_0-1628064032855.png

 

I have this measure which calculates sold quantities on a YTD basis : 

Quant. YTD = CALCULATE(SUM(Sales[Quantity]),DATESYTD('Date'[Day])) ... which works fine when there is no month selected on the Month slicer. If I select a month on the slicer, there is of course only one point left one the line chart. So I changed the measure in order to display all months on the line chart even if a month is selected on the slicer : 

Quant. YTD ALL Month = CALCULATE(SUM(Sales[Quantity]),DATESYTD('Date'[Day]), ALL('Date'[Month]))

The problem is : even with this ALL supposed to remove the month filter, there is only one point left in the line chart if the user select a specific month.

 

Can anyone help me on this?

 

Thank you.

Raphaël

 

5 REPLIES 5
Raph
Helper III
Helper III

Nobody?

Hi @Raph ,

 

Sorry for the late reply.

 

I don't think you can do this in a line or a bar chart.

You are using the month column in the axis...and the visual still being interacted with the slicer, clearly filters out the months on the basis of your selections in the slicer, even if you are using a measure with the ALL function in the values field. 

 

You'll have to remove the interaction between the two.

 

 

I hope this helps!

Mark this as a solution if I answered your question. Kudos are always appreciated.

 

Thanks! 

Raph
Helper III
Helper III

Please find below a link to the PBIX file : 

 

https://drive.google.com/file/d/1Qw55fM9d1btmrdCkwBYWK460k7Cswat5/view?usp=sharing

 

Thank you

 

Raphaël

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Raph ,

 

You can simply remove the interaction of Line chart with the slicer.

 

Thanks.

Thank you for your answer @Tanushree_Kapse 

 

Indeed that is how I fixed the problem but I am looking now for a DAX solution. I would like to understand why ALL () is not enough to remove filter applied on month.

 

Thank you

 

Raphaël

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.

Top Solution Authors