cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

New Member

## Countif

Hi,

I try to Countif how many times the numbers of value's  in one colum exist, if the same value exits in an other colum..

Any one who can help?

Thanks Ellen

1 ACCEPTED SOLUTION
Community Support

Hi @EllenBakker ,

I created a sample pbix file(see attachment), please check whether that is what you want.

1. Create a measure as below to get the number of repetitions of name1

``Countif = CALCULATE(COUNT('Table'[name1]),ALLEXCEPT('Table','Table'[name1]))``

2. Create a measure as below to judge if the same value for name1 exist in name2

``````name1 exist in name2? =
VAR _tab =
VALUES ( 'Table'[name2] )
RETURN
IF ( SELECTEDVALUE ( 'Table'[name1] ) IN _tab, 1, 0 )``````

If the above one can't help you get your expected result, please provide some sample data with Text format and your expected result with calculation logic and special example explanation. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support

Hi @EllenBakker ,

I created a sample pbix file(see attachment), please check whether that is what you want.

1. Create a measure as below to get the number of repetitions of name1

``Countif = CALCULATE(COUNT('Table'[name1]),ALLEXCEPT('Table','Table'[name1]))``

2. Create a measure as below to judge if the same value for name1 exist in name2

``````name1 exist in name2? =
VAR _tab =
VALUES ( 'Table'[name2] )
RETURN
IF ( SELECTEDVALUE ( 'Table'[name1] ) IN _tab, 1, 0 )``````

If the above one can't help you get your expected result, please provide some sample data with Text format and your expected result with calculation logic and special example explanation. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Employee

Please provide some mock data along with expected result, so someone can suggest a specific solution.

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors