Forum Discussion

Md_asgar's avatar
Md_asgar
Frequent Visitor
2 years ago
Solved

Groupng Table

I have a sample data set in the below:   ID DATE SERVICE DESCRIPTION SALE PRICE 022 20-06-2015 POT123 3 HIJKL                    185.19 022 20-06-2015 PACK ABC PACKAGE         ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Md_asgar ,

    You can remove the filtered records from the first step.

    let
        Source = Table,
        #"Grouped Rows" = Table.Group(Source, {"ID", "DESCRIPTION"}, {{"COUNT OF PATIENTS", each Table.RowCount(_), Int64.Type}}),
        #"Grouped Rows1" = Table.Group(#"Grouped Rows", {"DESCRIPTION", "COUNT OF PATIENTS"}, {{"NO. OF TIMES SERVICE WAS AVAILED", each Table.RowCount(_), Int64.Type}}),
        #"Sorted Rows" = Table.Sort(#"Grouped Rows1",{{"DESCRIPTION", Order.Ascending}})
    in
        #"Sorted Rows"

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group