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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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