Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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:
Team1 | Team2 | Total |
0 | 10 | 10 |
5 | 15 | 20 |
10 | 5 | 15 |
15 | 0 | 15 |
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.
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".
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.