cancel
Showing results 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

Frequent Visitor

## Simple countif

Hi everyone,

I'm quite new on Power BI. Could you please help me to write formula in Power BI column (COUNTIF formula in picture below). Thank you in advance.

2 ACCEPTED SOLUTIONS
Memorable Member

@Edmundas Hi!

= CONTAINS('Table','Table'[Random names], 'Table'[Employee]) + 0

BBF
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

``````Expected result CC =
COUNTROWS (
SUMMARIZE (
FILTER (
Data,
Data[Employee] = EARLIER ( Data[Employee] )
&& Data[Employee] IN DISTINCT ( Data[Random name] )
),
Data[Employee]
)
) + 0
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Visit my LinkedIn page by clicking here.

Schedule a meeting with me to discuss further by clicking here.

4 REPLIES 4
Frequent Visitor

Thanks guys, both formulas worked!!!

Memorable Member

@Edmundas However, I advise you to adopt mine, as it is computationally lighter.

BBF

Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

``````Expected result CC =
COUNTROWS (
SUMMARIZE (
FILTER (
Data,
Data[Employee] = EARLIER ( Data[Employee] )
&& Data[Employee] IN DISTINCT ( Data[Random name] )
),
Data[Employee]
)
) + 0
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Visit my LinkedIn page by clicking here.

Schedule a meeting with me to discuss further by clicking here.

Memorable Member

@Edmundas Hi!

= CONTAINS('Table','Table'[Random names], 'Table'[Employee]) + 0

BBF

Announcements

#### 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 Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors