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 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
- StachuCommunity 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 - AnonymousNot 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