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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
qhpowerbi
Helper III
Helper III

DAX = Count value on different column based on other column

Hi all,

 

I have column as below with ID and its element

qhpowerbi_0-1644998812330.png


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

qhpowerbi_1-1644998958699.png

 

How can i do this? Appreciate help from you guys


1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@qhpowerbi , a new column

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

View solution in original post

2 REPLIES 2
qhpowerbi
Helper III
Helper III

 This is the answer i needed, thank you @amitchandak !

amitchandak
Super User
Super User

@qhpowerbi , a new column

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.