Skip to main content
cancel
Showing results for 
Search instead 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

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
Europe Fabric Conference

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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