Forum Discussion
dinoscool3
4 years agoHelper II
Conditional Column based on other table
I have a table of registrations and a table of viewers. I would try to add them as a relationship but because of how the data is stored and the number of webinars, registrations, and viewers, I can't...
- 4 years ago
Try adding this as a calculated column in your Registrations table.
Watched = VAR _ViewCount = CALCULATE ( COUNTROWS ( Viewers ), TREATAS ( CALCULATETABLE ( SUMMARIZE ( Registrations, Registrations[Email], Registrations[Webinar] ) ), Viewers[Email], Viewers[Webinar] ) ) RETURN IF ( _ViewCount > 0, "Yes", "No" )
jdbuchanan71
4 years agoSuper User
Try adding this as a calculated column in your Registrations table.
Watched =
VAR _ViewCount =
CALCULATE (
COUNTROWS ( Viewers ),
TREATAS (
CALCULATETABLE (
SUMMARIZE ( Registrations, Registrations[Email], Registrations[Webinar] )
),
Viewers[Email],
Viewers[Webinar]
)
)
RETURN IF ( _ViewCount > 0, "Yes", "No" )