Forum Discussion

GRedhead's avatar
GRedhead
Helper I
4 years ago
Solved

Group Columns in Stacked Column Chart

Hi,

Does anyone know how I can group the following columns?

If I look at the data in a table I see the same Year and Qtr the same Case Type and want to sum the cases.
But for some reason, I cannot see it is not combining the rows highlighted.

 

  • Hi, i think we have worked it out, it appears to be because of the sort on the Year & Qtr column, it was on the month sort order but when we switch it to itself the column displays as I expected, a bit weird.

4 Replies

  • Hi, i think we have worked it out, it appears to be because of the sort on the Year & Qtr column, it was on the month sort order but when we switch it to itself the column displays as I expected, a bit weird.

  • Hello GRedhead ,


    Can you please check data. There might be blanks or spaces or NULL or "" but all looks similar.

    You can use Len(), ISBLANK() functions to rectify.

     

    Please mark it as answer if it solves your issue. Kudos are also appreciated.

     

    Cheers,

    Shishir

    • GRedhead's avatar
      GRedhead
      Helper I

      Sorry not sure I understand the above, all 3 lines have values please see my screenshot and the data on the left.

  • GRedhead 

     

    You can grouped the data in Power Query.Below are the steps

    let
    Source = Source,
    #"Grouped Rows" = Table.Group(Source, {"Year qtr", "CaseType"}, {{"Count", each List.Sum([Count]), type nullable number}})
    in
    #"Grouped Rows"

     

    Hope this will help you

     

    Regards

    sanalytics