Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Add new column with IF-ELSE condition in Power Query

I have table as the one on the left below and would like to transform into the one on the right based on the following condition:   If MTH is 9,10 or 11, sum all the PRICE (SUM all PRICE for MTH 9,...
  • Nathaniel_C's avatar
    Nathaniel_C
    4 years ago

    Hi Anonymous ,
    Here are the pics, might by in reverse order. 

    Groupby to get your sums, then divide by 12 to get your division, the use conditional col to decide which col to use.  Then delete intermediate columns.

    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel