Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
andii2617
Regular Visitor

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. 

 

andii2617_0-1678986564552.png

 

Thank you, 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@andii2617 Very easy if you unpivot your columns. Otherwise you can use this:

Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors