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
zilaifeng
Frequent Visitor

Slicer on combo chart

Hi,

Say if I have a combo chart with line and bars, is there a way to put a slicer so that I can choose to view line only, bars only, or both?

Thanks!

1 ACCEPTED SOLUTION
SteveCampbell
Memorable Member
Memorable Member

You can, but it takes a little work. The easiest way would be with butons and bookmarks. 

I reccomend you read the links in this reply.

 

Duplicate the graph three times, one with just lines, one with bars, one with both.

Hide two graphs. Open the selection pane and highlight the three graphs.

bc.png

 

 

 

 

 

 

 

 

 

then record a bookmark with just one graph visable. Rename the bookmark the same as the visable graph. 

Repeat for all three.

Under bookmark settings, open the slipsis and select only "Disaply" and "Selected Visuals":d.png

 

 

 

 

 

 

 

 

 

Nowe, make three buttons by home tab > insert > button > blank. Under the Action field in their properties select bookmar, and select the column bookmark. Under button text, you can write column only. Repeat for line and both.

 

Now, selecting the buttons will show the desired output (hold CONTROL and click if you are in the desktop).



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



View solution in original post

2 REPLIES 2
SteveCampbell
Memorable Member
Memorable Member

The other way, is to make a slicer table:

 

Home > Enter Data > add "Line" and "Bars", call it "FilterTable" and click load.

b.png

 

 

Now, add two measures:

Bars = if( "Bars" in VALUES(FilterTable[Value]),
    <<Your Column Measure>>
    BLANK()
)

Line= if( "Line" in VALUES(FilterTable[Value]),
    <<Your Line Measure>>
    BLANK()
)

Add "Lines" measure to the line value and "Bars" masure to the column value.

 

You can add the FilterTable[Value] column as a slicer, and toggle on and off the bars and line.

 

 



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



SteveCampbell
Memorable Member
Memorable Member

You can, but it takes a little work. The easiest way would be with butons and bookmarks. 

I reccomend you read the links in this reply.

 

Duplicate the graph three times, one with just lines, one with bars, one with both.

Hide two graphs. Open the selection pane and highlight the three graphs.

bc.png

 

 

 

 

 

 

 

 

 

then record a bookmark with just one graph visable. Rename the bookmark the same as the visable graph. 

Repeat for all three.

Under bookmark settings, open the slipsis and select only "Disaply" and "Selected Visuals":d.png

 

 

 

 

 

 

 

 

 

Nowe, make three buttons by home tab > insert > button > blank. Under the Action field in their properties select bookmar, and select the column bookmark. Under button text, you can write column only. Repeat for line and both.

 

Now, selecting the buttons will show the desired output (hold CONTROL and click if you are in the desktop).



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



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.