Forum Discussion
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
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
2 Replies
- Greg_DecklerCommunity 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
- CamstrHelper I
Greg_Deckler awesome, exactly what I needed.
Thank you