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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
vivapayne
New Member

Using Columns within Slicer

Hi all

I want to use a slicer to impact the data in a visual, but I can't figure it out! 

 

As the data stands at the moment I have three columns:

Team1Team2Total
01010
51520
10515
15015

What I'd like to do is show the total in the chart as default, but then use the slicer to display the relevant team when selected. Because of the size of the data table, I can't realistically have two or three lines of data per record. I've tried using in hierarchy, but I can't get that to work.

 

Do any of you have any ideas please?

 

Thanks in advance.

 

1 REPLY 1
lbendlin
Super User
Super User

Unpivot your data.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlDSUTI0UIrViVYyBTFNwUxDkDCUCRIGKogFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Team1 = _t, Team2 = _t]),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
    #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Columns",{{"Value", Int64.Type}})
in
    #"Changed Type"

How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors