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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Create total column(s) (Like Excel's CountIF() )

Hey Power BIs,

 

I am very new to Power BI and come from Excel. Hi. I have been spending days trying to accomplish what would take me seconds to do in Excel - with zero progress.

I want to create total columns that summarize a long list of columns, counting the number of times a defined text string appears.

Like so:

KIRE_0-1645620872343.png

 

It puzzles me that something so simple in Excel is seemingly almost impossible in Power BI / query. I must be wrong.

Surely, I'm missing a basic function. Please help!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Yeah, Power BI works better if you unpivot those columns. Then it is trivial. Otherwise, you need to use MC Aggregations: https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...



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...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous Yeah, Power BI works better if you unpivot those columns. Then it is trivial. Otherwise, you need to use MC Aggregations: https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...



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...
Anonymous
Not applicable

Just to clarify, I have thousands of columns. Is this still the way? At first glance, that seems like a lot of typing.

Anonymous
Not applicable

Hmm.. Interesting.

Thank you.

 

Funnily enough, this is the unpivoted data. I unpivoted it to establish a relationship with other tables.

 

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.