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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
RichOB
Post Partisan
Post Partisan

Need help with the count of missing categories

Hi, all dogs in my kennel need to have the Parvo, Rabies, and Distemper vaccinations. The Dog_Name column is all of the dogs currently in the kennels. The Requirements column is the vaccination the dog has got. What measure will show me: 

 

Toby = missing Distemper 

Spot = not missing any

Max = missing Rabies and Parvo

 

I really only need to show them as numbers, so in this scenario each vaccination has 1 dog missing it.

 

Dog_NameRequirements
TobyParvo
SpotParvo
TobyRabies
SpotRabies
MaxDistemper
SpotDistemper


Thanks!

1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1735614187539.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1735351510173.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur , thanks for your reply.

How could I arrange this so the Vaccines are in the left column and the number of missing rows are in the right column like the photo below, please? When I do this it changes the values to 0.

Vacc.png

Thanks

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1735614187539.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @RichOB 

 

Create a relate dimensions table for the requirements and then try the following measure:

Missing Vaccine = 
SUMX (
    SUMMARIZECOLUMNS (
        'Table'[Dog_Name],
        Requirements[Requirements],
        "@count",
            CALCULATE (
                COUNTROWS ( Requirements ),
                KEEPFILTERS (
                    NOT Requirements[Requirements] IN VALUES ( 'Table'[Requirements] )
                )
            )
    ),
    [@count]
)

 

danextian_0-1735298693721.png

Please see the attached pbix for the details.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Kedar_Pande
Super User
Super User

@RichOB 

Create a table with the required vaccinations:

Vaccinations = {"Parvo", "Rabies", "Distemper"}

Create the measure

Missing Vaccinations = 
VAR RequiredVaccinations = {"Parvo", "Rabies", "Distemper"}
VAR DogVaccinations = DISTINCT('Table'[Requirements])
VAR MissingVaccinations = EXCEPT(RequiredVaccinations, DogVaccinations)
RETURN COUNTROWS(MissingVaccinations)

 

hi @Kedar_Pande Thanks for your reply. How can this count the blank spaces per vaccine? It's the number of outstanding vaccines I need to know. Thanks

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors