cancel
Showing results for
Did you mean:
Frequent Visitor

## Count same values

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

1 ACCEPTED SOLUTION

Accepted Solutions
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
4 REPLIES 4
Community Support Team

## Re: Count same values

Hi @jest1234 ,

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
Frequent Visitor

## Re: Count same values

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

Frequent Visitor

## Re: Count same values

For help, this formula works in excel.

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

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

Announcements

#### 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!

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?

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

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