Forum Discussion
srkase
6 years agoHelper IV
MONTH FILTRATION IN SLICER
Hi I have data like this I want to have one single slicer which should contain months from Apr TO Mar. Based on that i want to filter the records in matrix table.. If We are having a se...
- 6 years ago
Hello Skarse,
you need to transform (unpivot) your table in order to achive the thing you want.
Here you can see how this would work.
BR,
Josef
If this post was helpful please share some Kudos and mark it as the solution :smileyvery-happy: Thank you very much!
srkase
6 years agoHelper IV
i want to have a single slicer which contains all the months... now if create a slicer, i have to add 12 slicers separately for each month?
mussaenda
6 years agoCommunity Champion
No need to add one by one.
try this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtDQyMDJQ0lFyBOEgr1A/IO0UrAAFUAkQbQjERkBsgETjxrE6xJnuBDUdptOQoMmkmO6IZDpxJpNiujOa2wmHCimmu0BNN0Yy3YigLcSa7oolVqnndjfyYjUWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [YEAR = _t, SHORTNAME = _t, DEALER = _t, TYPE = _t, PRODUCT = _t, VARIANT = _t, APR = _t, MAY = _t, JUN = _t, JUL = _t, AUG = _t, SEP = _t, OCT = _t, NOV = _t, DEC = _t, JAN = _t, FEB = _t, MAR = _t]),
#"Unpivoted Only Selected Columns" = Table.Unpivot(Source, {"APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC", "JAN", "FEB", "MAR"}, "Attribute", "Value"),
#"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Only Selected Columns",{{"Value", type number}})
in
#"Changed Type"