Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
Name | Achievement Type | Count for Enrichment Type is more than once for culture |
BOB | Enrichment - Culture | YES |
BOB | Enrichment - Culture | YES |
JENNY | Enrichment - Culture | YES |
JENNY | Enrichment - Culture | YES |
basically a count then if more than 0 say yes.
Does anymore know how this can be done?
Solved! Go to Solution.
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:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Try to add a new column with DAX like this:
Count for Enrichment =
IF('Table'[Achievement Type]<>blank(),"Yes","No")
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
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!
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:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |