Forum Discussion
joshua1990
2 years agoPost Prodigy
Percentage per Group
Hi experts! I have a table with the year, month and department information. In addition to that I have sales per product: Year Month Department Product Sales 2023 01 A A1 5 2023 ...
- 2 years ago
NewStep=Table.Combine(Table.Group(PreviousStepName,{"Year","Month","Department"},{"n",each let a=List.Sum([Sales]) in Table.AddColumn(_,"Percentage",each [Sales]/a)})[n])
joshua1990
2 years agoPost Prodigy
Fowmy : Thanks, but I have posted this question within the PQ area to get it resolved using PQ.
Any further ideas?
wdx223_Daniel
2 years agoCommunity Champion
NewStep=Table.Combine(Table.Group(PreviousStepName,{"Year","Month","Department"},{"n",each let a=List.Sum([Sales]) in Table.AddColumn(_,"Percentage",each [Sales]/a)})[n])