Forum Discussion
How to Filter Time Series Data in Columns
- 6 years ago
Hi datadad84,
If you want to slicer based on column name , you could try to modify data structure to unpivot column like below
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0BRIgbKIUqxOtlAQSMgIRBkDCGCyWDOIaAwlzIDZSio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, c1 = _t, c2 = _t, c3 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"c1", Int64.Type}, {"c2", Int64.Type}, {"c3", Int64.Type}}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name"}, "Attribute", "Value") in #"Unpivoted Columns"Or you could create a new table with column name in it(use this in slicer), then you need to create measure for each column (m1,m2,m3), then use below meausre to see whether it work or not
= switch(TRUE(),SELECTEDVALUE('Table'[name])="a", m1, SELECTEDVALUE('Table'[name])="b", m2)Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi datadad84,
If you want to slicer based on column name , you could try to modify data structure to unpivot column like below
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0BRIgbKIUqxOtlAQSMgIRBkDCGCyWDOIaAwlzIDZSio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, c1 = _t, c2 = _t, c3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"c1", Int64.Type}, {"c2", Int64.Type}, {"c3", Int64.Type}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name"}, "Attribute", "Value")
in
#"Unpivoted Columns"
Or you could create a new table with column name in it(use this in slicer), then you need to create measure for each column (m1,m2,m3), then use below meausre to see whether it work or not
= switch(TRUE(),SELECTEDVALUE('Table'[name])="a", m1, SELECTEDVALUE('Table'[name])="b", m2)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.