Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
dinoscool3
Helper II
Helper 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 get it to work. So I'm wondering if I can find a way this way. (Tables simplified)

 

Registration:

EmailWebinar
georgeburns@gb.comHow to tie shoes
bobhope@bh.comHow to tie shoes
jackbenny@jb.comHow to tie ties
donrickles@dr.comHow to tie ties

 

Viewers:

EmailWatch startWatch endWebinar
georgeburns@gb.com11:1211:15How to tie shoes
bobhope@bh.com11:1011:20How to tie shoes
Georgeburns@gb.com11:2011:30How to tie shoes
jackbenny@jb.com12:1012:30how to tie ties

 

What I want in the registration table:

EmailWebinarWatched
georgeburns@gb.comHow to tie shoesYes
bobhope@bh.comHow to tie shoesYes
jackbenny@jb.comHow to tie tiesYes
donrickles@dr.comHow to tie tiesNo

 

 

 

I think the idea would be:

For each row in the Registartions table:

  1. If a match exists between Registrations[email] and Viewers[email]
    1. If registrations[webinar_id] equals viewers[webinar_id]
      1. Set registrations[watched] to "Yes"
      2. Else set Set registrations[watched] to "No"

Unless I'm missing something here?

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

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

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

@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" )
amitchandak
Super User
Super User

@dinoscool3 ,

New column Registration =

var _1 = Maxx(filter(Viewers, Viewers[Email] =Registration[email]), Viewers[Email])

return

if(isblank(_1), "No", "Yes")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

When I try to do this, I can't add in the registration email in the filter, it only lets me add in values from the viewers table.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.