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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bschil98
Frequent Visitor

Selective filtering of line and column chart

I have a line and clustered column chart which all respond to one slicer. However, I'd like the line in the chart to independently respond to a different slicer as well. Is there a way to adjust the line without adjusting the bars?

 

Thank you!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@bschil98 Yes, use REMOVEFILTERS in the measure for your column to remove the slicer filter for that value. So like:

CALCULATE([Measure],REMOVEFILTERS('SlicerTable'[Column]))


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-henryk-mstf
Community Support
Community Support

Hi @bschil98 ,

 

According to your description, I have two suggestions. One is to use the SELECTEDVALUE and ALLEXCEPT functions to keep the filter conditions of different slicers.
Another way is to use the REMOVEFILTERS function. I did a test, the reference is as follows:

 

M_Month =
CALCULATE ( SUM ( Sales[Quantity] ), REMOVEFILTERS ( Sales[Calendar Year] ) )
M_Year =
CALCULATE ( SUM ( Sales[Quantity] ), REMOVEFILTERS ( Sales[Month] ) )

 

choose Month_slicer:

vhenrykmstf_0-1632977649020.pngvhenrykmstf_1-1632977669126.png

 

choose Year_slicer:

vhenrykmstf_2-1632977740641.pngvhenrykmstf_3-1632977757087.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @bschil98 ,

 

According to your description, I have two suggestions. One is to use the SELECTEDVALUE and ALLEXCEPT functions to keep the filter conditions of different slicers.
Another way is to use the REMOVEFILTERS function. I did a test, the reference is as follows:

 

M_Month =
CALCULATE ( SUM ( Sales[Quantity] ), REMOVEFILTERS ( Sales[Calendar Year] ) )
M_Year =
CALCULATE ( SUM ( Sales[Quantity] ), REMOVEFILTERS ( Sales[Month] ) )

 

choose Month_slicer:

vhenrykmstf_0-1632977649020.pngvhenrykmstf_1-1632977669126.png

 

choose Year_slicer:

vhenrykmstf_2-1632977740641.pngvhenrykmstf_3-1632977757087.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@bschil98 Yes, use REMOVEFILTERS in the measure for your column to remove the slicer filter for that value. So like:

CALCULATE([Measure],REMOVEFILTERS('SlicerTable'[Column]))


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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