Forum Discussion

haniizz's avatar
haniizz
Icon for Helper II rankHelper II
3 years ago
Solved

Radar chart category

Hello community

I need your kind support I want to have a radar chart from the table below

 

IDFeelingsHealthMentality
a234
b233
c113

 

where 1 = Excelent

2 = very good

3 = bad

4 = very bad

so I want to show in the radar chart category ( exelent , very good , bad , very bad ) where feelings, health , mental overlaying over each other sorry if I couldn't explain it clearly

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi haniizz 

    The solution  amitchandak offered is right, and you can refer to the following solution.

    1.Put the following code to Advanced Editor in power query.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTICYmMgNlGK1YlWSkISMQaLJANZhlAMFIkFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Feelings = _t, Health = _t, Mentality = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"Feelings", Int64.Type}, {"Health", Int64.Type}, {"Mentality", Int64.Type}}),
        #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"Feelings", "Health", "Mentality"}, "Attribute", "Value"),
        #"Added Conditional Column" = Table.AddColumn(#"Unpivoted Only Selected Columns", "Custom", each if [Value] = 1 then "Excelent" else if [Value] = 2 then "very good" else if [Value] = 3 then " bad" else if [Value] = 4 then " very bad" else null)
    in
        #"Added Conditional Column"

    2.Create a measure

    Measure = CALCULATE(COUNTROWS('Table'))

    3.Then use the custom visual and put the related field

     

    Output

     

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi haniizz 

    The solution  amitchandak offered is right, and you can refer to the following solution.

    1.Put the following code to Advanced Editor in power query.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTICYmMgNlGK1YlWSkISMQaLJANZhlAMFIkFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Feelings = _t, Health = _t, Mentality = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"Feelings", Int64.Type}, {"Health", Int64.Type}, {"Mentality", Int64.Type}}),
        #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"Feelings", "Health", "Mentality"}, "Attribute", "Value"),
        #"Added Conditional Column" = Table.AddColumn(#"Unpivoted Only Selected Columns", "Custom", each if [Value] = 1 then "Excelent" else if [Value] = 2 then "very good" else if [Value] = 3 then " bad" else if [Value] = 4 then " very bad" else null)
    in
        #"Added Conditional Column"

    2.Create a measure

    Measure = CALCULATE(COUNTROWS('Table'))

    3.Then use the custom visual and put the related field

     

    Output

     

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.