Forum Discussion
Pri
7 years agoFrequent Visitor
Creating slicer when data is in different columns
I have data in three different columns and I want to create a slicer with this data.
Please suggest a way to do the same.
Hi Pri ,
Go to power query as the picture as below.
Then choose all the columns and upivot columns as the picture below.
6 Replies
- mussaendaCommunity Champion
Provide sample data and expected output.
- PriFrequent Visitor
Sample Data :
Total Value Internal Value External Value 100 40 60 70 30 40 Expected Output:
Slicer with three options in dropdown : Total Value, Internal Value, External Value
- mussaendaCommunity Champion
Based on your provided data, try this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwUNJRMgERZgZKsTrRSuYgtjFUNDYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Total Value" = _t, #"Internal Value" = _t, #"External Value" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Total Value", Int64.Type}, {"Internal Value", Int64.Type}, {"External Value", Int64.Type}}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value") in #"Unpivoted Columns"