Forum Discussion
How do I sum multiple columns, based on two specific text in a row?
Hi,
I need to add multiple columns for certain values in a row. In this table below, I need to add for 2022 only April totals for five columns. Then I need to add 2022 for October, in a separate column, for the same columns. I have not been able to successfully acheive this. In the end, I want a column that sums up all the columns, for each month individually. I then need to repeat this for 2021, 2020, and so on. The years and months are in the same column together.
Previously, this date was in is an excel Pivot table and that is the table that was pulled into Power Bi, if this information helps build context.
Thank you,
2 Replies
- Greg_DecklerCommunity Champion
andii2617 Very easy if you unpivot your columns. Otherwise you can use this:
Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community
- andii2617Regular Visitor
Hi Greg_Deckler,
For some reason the Multi-Column Aggregation did not work for me.
However, I was able to unpivot the columns, which function should I use to acheive the above?