Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX = Count value on different column based on other column

Hi all,

 

I have column as below with ID and its element


I would like to calculated column that count the number of element for each ID..as example the count of ROCK as below

 

How can i do this? Appreciate help from you guys


  • Anonymous , a new column

    if([Element1] ="Rock",1,0) + if([Element2] ="Rock",1,0)+ if([Element3] ="Rock",1,0)

2 Replies

  • Anonymous , a new column

    if([Element1] ="Rock",1,0) + if([Element2] ="Rock",1,0)+ if([Element3] ="Rock",1,0)