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
Community Support

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
If this post helps, please consider accept as solution to help other members find it more quickly.
4 REPLIES 4
Community Support

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
If this post helps, please consider accept as solution to help other members find it more quickly.
Frequent Visitor

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

For help, this formula works in excel.

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

Community Support

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
If this post helps, please consider accept as solution to help other members find it more quickly.

Announcements

#### Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

#### Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors