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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
emcarwardine
New Member

trying to do a count if there is more than once value next to a persons name

Hi All

 

Very new to power bi. I am trying to do a count, if formula where a student has a achievement categorie next to their name at least once, the formula will say yes no. for example:

 

NameAchievement TypeCount for Enrichment Type is more than once for culture
BOBEnrichment - CultureYES
BOBEnrichment - CultureYES
JENNYEnrichment - CultureYES
JENNYEnrichment - CultureYES

 

basically a count then if more than 0 say yes.

 

Does anymore know how this can be done?

1 ACCEPTED SOLUTION

@emcarwardine 

 

Oh Ok, try this then:

Count for Enrichment =
IF (
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                && 'Table'[Achievement Type] = "Enrichment - Culture"
        )
    ) > 1,
    "Yes",
    "No"
)

Output:

VahidDM_0-1658322770260.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

3 REPLIES 3
VahidDM
Super User
Super User

HI @emcarwardine 

 

Try to add a new column with DAX like this:

Count for Enrichment = 
IF('Table'[Achievement Type]<>blank(),"Yes","No")

 

Output:

VahidDM_0-1658321705428.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Hi 

 

thanks for the swift response - will this look at the students name also? So in english not a formular I need (best way for me to explain sorry!)

 

if "bob" has "enrichment - culture" more then 1 time, say "yes"

 

Hope that makes sense! 

@emcarwardine 

 

Oh Ok, try this then:

Count for Enrichment =
IF (
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                && 'Table'[Achievement Type] = "Enrichment - Culture"
        )
    ) > 1,
    "Yes",
    "No"
)

Output:

VahidDM_0-1658322770260.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.