Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Please see the sample data below (current state). I am trying to group rows by the account number, select the project mgr and city associated with the lowest project#, and sum the revenue and hours worked. I don't have to list all the project #'s but if that is easily done that would be a bonus. I also wanted to note that there could be as many as 75 project #'s associated with any account number. Any assistance would be greatly appreciated. Thank you!!
Solved! Go to Solution.
=Table.Group(PreviousStepName,"Account #",{{"Project #",each Text.Combine(List.Transform([#"Project #"],Text.From),",")},{"Project Mgr.",each Table.Sort(_,"Project #")[#"Project Mgr."]{0}},{"City",each Table.Sort(_,"Project #")["City"]{0}},{"Rev",each List.Sum([Rev])},{"Hours Billed",each List.Sum([Hours Billed])}})
Thank you! This worked perfectly.
=Table.Group(PreviousStepName,"Account #",{{"Project #",each Text.Combine(List.Transform([#"Project #"],Text.From),",")},{"Project Mgr.",each Table.Sort(_,"Project #")[#"Project Mgr."]{0}},{"City",each Table.Sort(_,"Project #")["City"]{0}},{"Rev",each List.Sum([Rev])},{"Hours Billed",each List.Sum([Hours Billed])}})
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 6 | |
| 5 | |
| 5 |