Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
2 years ago
Solved

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 ...
  • wdx223_Daniel's avatar
    wdx223_Daniel
    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])