cancel
Showing results for
Did you mean:
Helper III

## How do I get count of &quot;Yes&quot; from this new created Dax column?

@Ibendlin created this column for me that calculates whether stores have 2+ Champion badges. I'm trying to get a count of the number of "Yes", but a simple Countrows isn't working.

Two Champions equals
return if(c>1,"Yes","No")

This was created in Dax, so it's not on my main table. Can I still get a count of the "Yes" from it?
1 ACCEPTED SOLUTION
Super User III

There's 2 answers to this.  There are actually 5 Yes in the Two Champions column

If you want that then create a mesure like this

``Yes Count = CALCULATE(COUNTROWS('Badges'),FILTER('Badges', 'Badges'[Two Champions] = "Yes" ))``

But if you want a distinct count of store ID's with a Yes then use this - the answer is 2

``Yes Count = CALCULATE(DISTINCTCOUNT('Badges'[Store ID]),FILTER('Badges', 'Badges'[Two Champions] = "Yes" ))``

Regards

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

4 REPLIES 4
Super User III

There's 2 answers to this.  There are actually 5 Yes in the Two Champions column

If you want that then create a mesure like this

``Yes Count = CALCULATE(COUNTROWS('Badges'),FILTER('Badges', 'Badges'[Two Champions] = "Yes" ))``

But if you want a distinct count of store ID's with a Yes then use this - the answer is 2

``Yes Count = CALCULATE(DISTINCTCOUNT('Badges'[Store ID]),FILTER('Badges', 'Badges'[Two Champions] = "Yes" ))``

Regards

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

Super User III

Can you please provide some sample data.

regards

Phil

If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

Helper III
Community Support

Hi  @bcbuckley13,

You could directly put the column in a table field >choose "count" or "discount",and you will see the value you need:

Check the .pbix file attached if needed.

Best Regards,
Kelly

Announcements