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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.