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
Anonymous
Not applicable

Calculated Column - IF client activity contains X then Y

Hi guys, 

 

This will likely be a very simple answer but I'm hitting a wall for some reason. 

 

Essentially, If the client ID has a certin activity against it, I need a True or false/1 or 0 next to the entire client record. For exmple, see the table below. 

 

Activites

client IDactivity 
1a
1b
1c
2a
2a
2a
3a
3b
3b
4c
4c
4c

 

I need to add a colum that identifies all clients who had NOT had activity C. 

 

result 

Clinet IDactivity new
1a0
1b0
1c0
2a1
2a1
2a1
3a1
3b1
3b1
4c0
4c0
4c0

 

As client 1 and 4 have both had Activity C, all their records needs to be False or 0. 

 

Ideally, this needs to be completed in DAX. 

 

Thanks in Advanced. 

Edit/note
Client ID on my actual table is Alphanumeric. 

1 ACCEPTED SOLUTION
AntrikshSharma
Community Champion
Community Champion

@Anonymous For a measure try this:

1.PNG

 

For a calculated column try this:

2.PNG

PBI file is attached below my signature.

View solution in original post

1 REPLY 1
AntrikshSharma
Community Champion
Community Champion

@Anonymous For a measure try this:

1.PNG

 

For a calculated column try this:

2.PNG

PBI file is attached below my signature.

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.

Top Kudoed Authors