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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Camstr
Helper I
Helper I

How to count duplicate values across multiple columns

Hello,

I don't have much experience with DAX and has done a lot of searches to try and figure out what to do.

My data source contains test grades (1-4 potential) for a given number of students.

I want to create a pie chart that shows me the number of Grade 1's, Grade 2's..etc.

This is easy to do in excel, see 'CountIF' table below the grades.

But in Power BI desktop I think it requires DAX competence?

How do I do this?

Thank you

 

Test Grades count.JPG

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Camstr Easiest thing you can do is go into Power Query Editor, select your Name column, right-click and choose "Unpivot other columns". Then you don't need DAX. If for some reason you want to leave your data as is, then you will need something like MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Fabric Community

 

Also, there are equivalents for COUNTIF in DAX: Excel to DAX Translation - Microsoft Fabric 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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Camstr Easiest thing you can do is go into Power Query Editor, select your Name column, right-click and choose "Unpivot other columns". Then you don't need DAX. If for some reason you want to leave your data as is, then you will need something like MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Fabric Community

 

Also, there are equivalents for COUNTIF in DAX: Excel to DAX Translation - Microsoft Fabric 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...

@Greg_Deckler awesome, exactly what I needed.

Thank you

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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