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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jfattic
Microsoft Employee
Microsoft Employee

Number of parents without children

What formula can I use to count the number of parents that have zero children?

 

I have a table of Orders that have a related table of child Items. I need to know how many Orders have no associated Items. (Orders without Items are an error that we have to look out for.)

1 ACCEPTED SOLUTION

Hi @jfattic 

 

You can add a Measure  like below

 

Count of Orders with no Items  = 
SUMX( 
    Orders,
    CALCULATE( INT( ISEMPTY( OrderItems ) ) )
)

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

I wrote that once: https://community.powerbi.com/t5/Quick-Measures-Gallery/Childless/m-p/625084#M305


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @jfattic 

 

You can add a Measure  like below

 

Count of Orders with no Items  = 
SUMX( 
    Orders,
    CALCULATE( INT( ISEMPTY( OrderItems ) ) )
)

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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