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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
CoTheiss
Frequent Visitor

Card visual with number of non-matches from related table

I do have two tables Products and ProductGroup that are related to each other via the field GroupID.

Now I want to create a Card that shows the number of ProductGroups that have no Products inside.

 

But as the ProductGroup table knows all contracts but not the No. of products assigned - and the products table knows all products and their assigned product groups but not those groups that have no assignment, I am a little bit lost here 🙂 

 

Products
ProductID
GroupID



ProductGroup
GroupID
Name

 

I guess this one is super easy, but still I dont know how to achieve it.

Any advice? 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@CoTheiss ,

 

countx(except(distinct(Productgroup[groupid]), distinct(Products[groupid]) ) , [groupid])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
CoTheiss
Frequent Visitor

thank you so much @amitchandak ! 
That worked - definitely would not have come to that solution by experimenting on my own. 

Much appreciated

amitchandak
Super User
Super User

@CoTheiss ,

 

countx(except(distinct(Productgroup[groupid]), distinct(Products[groupid]) ) , [groupid])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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