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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors