Forum Discussion

dinoscool3's avatar
dinoscool3
Helper II
4 years ago
Solved

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...
  • jdbuchanan71's avatar
    4 years ago

    dinoscool3 

    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" )