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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.