cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Counting specific text values in a column

Hey all,

 

PBI noob back again.

 

I have a data set that a column has about 5 different possible values. example

CategoryType
petcat
petdog
pethorse
petcat
petcat
pethorse

I need to count only 2 of the 3 values? (e.g I need to count the cat and dog entries but not the horse)

How do I do that??

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Counting specific text values in a column

@Jaydpie 

 

count_dog_cat = CALCULATE(COUNT(PetTable[Type]),PetTable[Type] IN {"cat","dog"})



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂 




Regards,
Nandu Krishna

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍

Proud to be a Super User!

View solution in original post

1 REPLY 1
Highlighted
Super User IV
Super User IV

Re: Counting specific text values in a column

@Jaydpie 

 

count_dog_cat = CALCULATE(COUNT(PetTable[Type]),PetTable[Type] IN {"cat","dog"})



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂 




Regards,
Nandu Krishna

Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors