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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ImaginedCloud
Frequent Visitor

Count NULL Rows with Joined Table

I have two tables joined by AccountID. Relationship is one to many. I need to count the Number of NULL's in Table A that do not have TAG in Table B.

 

Im using Direct Query so ISBLANK does not Work. 

 

NULL with No Tags = CALCULATE( COUNTROWS('Table A'),FILTER( 'Table A' ,'Table A'[STATUS]= BLANK() ) )

Should Return Count of 4. I see that it is counting all rows in Table A That are NULL. Should I add another Filer to see which AccountID's  have TAGS?

 

Table A

 

AccountIDStatus
003fcb4e-a07b-4c30-8c13-c35f0a13c262NULL
00705517-d96b-4647-a0da-67246178117fNULL
007de13c-f63e-4bbb-acb7-9309dde4ed7cNULL
008a14eb-9456-4902-b505-12c0632b6f97NULL
00d32e84-c29d-4809-a657-ef2992471e19NULL
00e86ef3-bba2-44eb-8a72-43424096d101NULL
00fd2cb9-4209-4938-9657-b420798486a3NULL
01063b28-d5ab-48ee-a9c6-7c8b99b995f6NULL
0109ef64-f060-4434-a92c-d1672b66476cNULL
013f24d8-f194-46de-9e60-69ddf6df324eNULL
03025988-4ba6-4e6f-a8dc-d65db2f6293bNULL
03028869-5da9-4b59-8b8d-bd171d533235NULL
0307f830-a3c7-438c-80a7-dc0ffae6cbcaNULL
0362e71a-f366-40a4-9965-f51b95234e6dNULL

 


Table B

 

 

AccountIDTag
003fcb4e-a07b-4c30-8c13-c35f0a13c262Pre-Sale
00705517-d96b-4647-a0da-67246178117fSold
007de13c-f63e-4bbb-acb7-9309dde4ed7cPre-Sale
008a14eb-9456-4902-b505-12c0632b6f97Deceased
00d32e84-c29d-4809-a657-ef2992471e19Pre-Sale
00e86ef3-bba2-44eb-8a72-43424096d101Pre-Sale
00fd2cb9-4209-4938-9657-b420798486a3Pre-Sale
01063b28-d5ab-48ee-a9c6-7c8b99b995f6Sold
0109ef64-f060-4434-a92c-d1672b66476cBankruptcy
013f24d8-f194-46de-9e60-69ddf6df324eDeceased
0149cd06-3da4-4610-8489-b5f1e6707b8dBankruptcy
0156c9be-7370-4211-be71-9a12f218b86bSold
01620cd3-96c2-40f6-8b4a-bedbb318fc7cBankruptcy
01688074-2bc9-46c6-9e96-c2e7e1ade585Bankruptcy
3 REPLIES 3
PattemManohar
Community Champion
Community Champion

Seems like similar issue posted earlier, Could you please try the steps I've mentioned in the below thread...

 

https://community.powerbi.com/t5/Desktop/check-for-relation-with-other-table/m-p/524213#M245299





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

Proud to be a PBI Community Champion




Similar, But I need the COUNT of NULL ROWS from Table A that are not In Table B. What you linked gives me the total COUNT of Table B. 

 

Thanks for your help. 

Hi @ImaginedCloud,

 

Please try the formulas below.

 

Column = LOOKUPVALUE('TableB'[Tag],TableB[AccountID],'TableA'[AccountID])

Measure = CALCULATE(COUNTROWS('TableA'),FILTER('TableA','TableA'[Column]=BLANK()))

Then you could get your desired output.

 

Capture.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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