Forum Discussion
Anonymous
3 years agoNot applicable
Compare one to many column values between two tables
Hello, I have a Students table that lists each UserID value once. I want to know in a new column in the Students table if the UserID field has any matching values in the Infractions table. It c...
- 3 years ago
Thank you for posting the data.
If you want to create a calculated column in the Students table, the existing relationship makes things reasonably straightforward.
NewCol = CALCULATE(COUNT(Infractions[Infraction]))
That will give you the count for each student. If you want a 1 or 0 you just edit the formula using an IF statement.Let me know if that helps.
HotChilli
Community Champion
3 years agoThank you for posting the data.
If you want to create a calculated column in the Students table, the existing relationship makes things reasonably straightforward.
NewCol = CALCULATE(COUNT(Infractions[Infraction]))
That will give you the count for each student. If you want a 1 or 0 you just edit the formula using an IF statement.
Let me know if that helps.