Forum Discussion

BIswajit_Das's avatar
BIswajit_Das
Impactful Individual
2 years ago

calculated table on PBI

Hello I need guidance on the calculated table
I have a table like

GROUP WIN COUNT ROUND
0-5%B18IVRCOM
0-5%B7IVRPP
0-5%B11IVRBC

and my required result is like

ROUND GROUP B I
IVRCOM0-5%18 
IVRPP0-5%7 
IVRBC0-5%11 

on a calculated table
Thank & Regards

3 Replies

  • you'd better do it in power query

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtA1VVXSUXICYkMLIOEZFuTs76sUq4MiZQ6RCQhAlzA0hMg4OSvFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [GROUP = _t, #" WIN" = _t, #" COUNT" = _t, #" ROUND" = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"GROUP", type text}, {" WIN", type text}, {" COUNT", Int64.Type}, {" ROUND", type text}}),
        #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[#" WIN"]), " WIN", "GROUP")
    in
        #"Pivoted Column"