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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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