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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Count If In A Related Table

Hello,

I have a measure in Table-A that I would like to deuplicate, but only if the Unique ID is contained in Table-B, with the relationship established between the Unique ID fileds. 

So, If I have 11 records as a result of the current Measure in Table-A

How do I get this same result, but only for the 9 records with matching Unique ID in Table-B?

 

Here is the measure for Table-A:

ReStartCount = CALCULATE(StartDetail[start count], StartDetail[startdate] >= StartDetail[DateBeginFootprint], StartDetail[starttype] = "Resubscribed Start")

 

2 REPLIES 2
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1Column2
A1
B2.5

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Sure thing.

In this subset, Table A has 11 rows.   In Table B (whole dataset not copied) there are 9 rows with matching Unique IDs.  I want to count just those 9 rows. 

Thanks for the help.

 

Table A: 

Unique IDstarttypestartdateDateBeginFootprint
40431973Resubscribed Start12-Aug-228/1/2022 0:00
73209141Resubscribed Start2-Oct-228/1/2022 0:00
73287965Resubscribed Start9-Oct-228/1/2022 0:00
10406350Resubscribed Start4-Sep-228/1/2022 0:00
73312306Resubscribed Start30-Oct-228/1/2022 0:00
73333199Resubscribed Start23-Oct-228/1/2022 0:00
50563861Resubscribed Start18-Sep-228/1/2022 0:00
60803325Resubscribed Start14-Aug-228/1/2022 0:00
10994140Resubscribed Start14-Aug-228/1/2022 0:00
30972428Resubscribed Start9-Oct-228/1/2022 0:00
40219278Resubscribed Start9-Oct-228/1/2022 0:00

 

Table B:

zipcodeUnique IDDateBeginFootprint
30253AJC60398998Monday, August 01, 2022
30253AJC73280714Monday, August 01, 2022
30253AJC10175238Monday, August 01, 2022
30253AJC70403227Monday, August 01, 2022
30253AJC60614045Monday, August 01, 2022
30253AJC50642527Monday, August 01, 2022
30253AJC30576515Monday, August 01, 2022
30253AJC60848377Monday, August 01, 2022

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.