Forum Discussion

syasmin25's avatar
syasmin25
Helper V
6 years ago
Solved

DAX Measure

Hello,  I have come across an issue and was wondering if there is a way around it. I am providing a sample of the date here with a few columns.  If I want to show a table that would show th...
  • dax's avatar
    6 years ago

    Hi syasmin25 , 

    You could choose [Branch] and [Department] columns ,  try "unpivot column" , then use this in Table like below

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwVNJRCk7MSS0G0r6JmXlKsTogYSMwtyg7My8dyPLLLynKgMoYA/kBpUXJGYnFmJImQL5nCMjI/NKikozUxOISqIwpkj0QyfJUuKQZTBvEBbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Department = _t, Branch = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Department", type text}, {"Branch", type text}}),
        #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ID"}, "Attribute", "Value")
    in
        #"Unpivoted Columns"

     

    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.