Forum Discussion
Groupng Table
- Anonymous2 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 TeamIf 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
Hi Md_asgar, unfortunately I don't uderstand your quesiton... You've posted an input, which is good (please make sure to paste it as a table so person who help you can easily copy it for testing).
Now, having that input, what do you want to achieve? try to make it clear step-by-step. If you have formulas in Excel, please explain them in details. After that we might be able to help you 🙂
- Md_asgar2 years agoFrequent Visitor
Sergii24 I have mentioned the problem in more details about, I hope now you will be able to understand the question.
- Anonymous2 years agoNot applicable
Hi Md_asgar ,
Reference the source table in PowerQuery, then filter out all 'ABC PACKAGE' records, then group by [ID],[DESCRIPTION] to calculate count rows, and finally group by [DESCRIPTION],[COUNT OF PATIENTS] to calculate count rows.let Source = Table, #"Filtered Rows" = Table.SelectRows(Source, each ([DESCRIPTION] = "ABC PACKAGE")), #"Grouped Rows" = Table.Group(#"Filtered Rows", {"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}}) in #"Grouped Rows1"Best Regards,
Gao
Community Support TeamIf 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
- Md_asgar2 years agoFrequent Visitor
Hi Anonymous
Thanks for the solution, but the solution which you gave is static, suppose I have more than 50 descriptions and I want to see all descriptions in the same way, which means whatever the number descriptions I want to see for all like this. So, in this case, how to do it?