Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Edmundas
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.

 

Countif.jpg

2 ACCEPTED SOLUTIONS
BeaBF
Memorable Member
Memorable Member

@Edmundas Hi!

 

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

View solution in original post

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1668591481579.png

 

 

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.

View solution in original post

4 REPLIES 4
Edmundas
Frequent Visitor

Thanks guys, both formulas worked!!!

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

 

BBF

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1668591481579.png

 

 

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.

BeaBF
Memorable Member
Memorable Member

@Edmundas Hi!

 

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.