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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count if something in column 1, matches whats in column 2

Hi,

 

I am trying to count how many times something in column one matches what is in column 2. I have put an example below - 

 

amygill_2_0-1603363752415.png

I would like to count how many times the proof contact is the same as the sales person. Can anyone help? A total count is fine, so in this example it would be 2.

 

Thanks,

1 ACCEPTED SOLUTION
danno
Resolver V
Resolver V

Hi, this measure will do the trick: 

Matches = CALCULATE(COUNTROWS(Data), FILTER(Data, [Proof contact] = [Sales person]))
Hope this helps. 
Dan

View solution in original post

2 REPLIES 2
danno
Resolver V
Resolver V

Hi, this measure will do the trick: 

Matches = CALCULATE(COUNTROWS(Data), FILTER(Data, [Proof contact] = [Sales person]))
Hope this helps. 
Dan
TomMartens
Super User
Super User

Hey @Anonymous ,

 

using DAX you can create a calcualted column like so:

isequal = IF(<tablename>[Sales person] = <tablename>[Proof contact] , 1 , blank() )

Then you can use the new column on a card visual.

 

Hopefully, this provides what you are looking.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.