Forum Discussion
Anonymous
3 years agoNot 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...
Stachu
3 years agoCommunity 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).
| Column1 | Column2 |
| A | 1 |
| B | 2.5 |
Anonymous
3 years agoNot 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 ID | starttype | startdate | DateBeginFootprint |
| 40431973 | Resubscribed Start | 12-Aug-22 | 8/1/2022 0:00 |
| 73209141 | Resubscribed Start | 2-Oct-22 | 8/1/2022 0:00 |
| 73287965 | Resubscribed Start | 9-Oct-22 | 8/1/2022 0:00 |
| 10406350 | Resubscribed Start | 4-Sep-22 | 8/1/2022 0:00 |
| 73312306 | Resubscribed Start | 30-Oct-22 | 8/1/2022 0:00 |
| 73333199 | Resubscribed Start | 23-Oct-22 | 8/1/2022 0:00 |
| 50563861 | Resubscribed Start | 18-Sep-22 | 8/1/2022 0:00 |
| 60803325 | Resubscribed Start | 14-Aug-22 | 8/1/2022 0:00 |
| 10994140 | Resubscribed Start | 14-Aug-22 | 8/1/2022 0:00 |
| 30972428 | Resubscribed Start | 9-Oct-22 | 8/1/2022 0:00 |
| 40219278 | Resubscribed Start | 9-Oct-22 | 8/1/2022 0:00 |
Table B:
| zipcode | Unique ID | DateBeginFootprint |
| 30253 | AJC60398998 | Monday, August 01, 2022 |
| 30253 | AJC73280714 | Monday, August 01, 2022 |
| 30253 | AJC10175238 | Monday, August 01, 2022 |
| 30253 | AJC70403227 | Monday, August 01, 2022 |
| 30253 | AJC60614045 | Monday, August 01, 2022 |
| 30253 | AJC50642527 | Monday, August 01, 2022 |
| 30253 | AJC30576515 | Monday, August 01, 2022 |
| 30253 | AJC60848377 | Monday, August 01, 2022 |