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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ncio
Helper II
Helper II

Count rows with no rows in a related table

Hello,

 

I have 2 related table, and I'd like to calculate the number of rows in table without any values in table 2.

==> For the example below, the result should be 2 (rows 3 and 4 are not in table 2). 

 

Table 1

1
2
3
4

 

Table 2

1
1
2
2
2

 

Everything I tried didn't give me the expected result, could  you help me?

 

Thank you!

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Ncio in case I understand your model is like this:

SpartaBI_0-1651506945784.png

Then, you can create this measure:

Measure = 
COUNTROWS( 
    FILTER(
        Table1,
        ISEMPTY(RELATEDTABLE(Table2))
    )
)

In case it solved your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂

 

View solution in original post

2 REPLIES 2
SpartaBI
Community Champion
Community Champion

@Ncio in case I understand your model is like this:

SpartaBI_0-1651506945784.png

Then, you can create this measure:

Measure = 
COUNTROWS( 
    FILTER(
        Table1,
        ISEMPTY(RELATEDTABLE(Table2))
    )
)

In case it solved your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂

 

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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