cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jest1234 Frequent Visitor
Frequent Visitor

Count same values

Can you help me please.

 

I have to colums with data and want to count the same values. 

 

duplicats.jpg

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Count same values

Hi @jest1234 ,

You can use below measure to find out values exists in both two columns:

Measure =
COUNTROWS (
    INTERSECT ( VALUES ( Table1[ColumnA] ), VALUES ( Table1[ColumnB] ) )
)

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Count same values

Hi @jest1234 ,

I'm not so clear for your requirement, can you please explain more about this?

If you mean you want to get the count records who has same value on multiple columns, you can try to use following measure formula:

Measure =
COUNTROWS ( FILTER ( ALL ( Table ), [Column1] = [Column2] ) )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
jest1234 Frequent Visitor
Frequent Visitor

Re: Count same values

HI @v-shex-msft 

i appologise for bad description.

 

In one colum I have data for one month and in other colum for next month.

My quest is to find out how many same strings are in both colums. Probably it would work out, the number of duplicats.

 

I hope i have been more clear.

 

tnx, for help

jest1234 Frequent Visitor
Frequent Visitor

Re: Count same values

For help, this formula works in excel.

 

=SUMPRODUCT(--(ISNUMBER(MATCH(B28:B199999;C28:C49999;0))))

Community Support Team
Community Support Team

Re: Count same values

Hi @jest1234 ,

You can use below measure to find out values exists in both two columns:

Measure =
COUNTROWS (
    INTERSECT ( VALUES ( Table1[ColumnA] ), VALUES ( Table1[ColumnB] ) )
)

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors