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

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

Reply
k1s2
Helper I
Helper I

Count number of times specific value appears in each row across columns whose name contains

 
How do I create a DAX formula for a caculated column that counts the number of times the cell value = "High" across column names ending with the text "Rating"?
4 REPLIES 4
k1s2
Helper I
Helper I

Thanks for your reply, 

 

I tried unpivoting, all except the unique ID column, then filtered 'Attribute' for column names ending in "Rating", then filtered 'Values' for "High", then grouped by unique ID and got a new 'Count' column...

...but lost all the original columns. How do I get them back along with the new Count column? 

@k1s2 I was talking about a DAX solution. You unpivot and then write the appropriate DAX.



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

After I unpivot in Power Query, what would be the way to count using DAX?  

I have ~400 columns, of which 114 end in the word "Rating", the values of which sometimes contain the word "High".  I'm looking to avoid building a DAX measure that has to names each of the columns individually.

Greg_Deckler
Community Champion
Community Champion

@k1s2 Generally you would unpivot those columns. Or, you could use MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Fabric Community

 

Otherwise, in Power Query, I would do what you did in terms of transformation as a custom function and then use that function in a custom column.



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

Helpful resources

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