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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PanosIWA
Frequent Visitor

Check if email exisits across linked tables.

I have 3 tables linked by 2 different fields as shown in the attached screen shot.  I need (a new column or measure, I think) that checks each account number, in the account table, to see if a corresponding email address exists....  in the Interested Party table. 

Yellow highlight shows link between Account and SubMaster tables

Orange highlight shows link between SubMaster and Interested Party tables

 

Please help.  Diagram attached.

 

TablesRelation.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PanosIWA ,

 

Because you don't show your sample data, so I don't know what kind of data you have.

 

Assuming that you have the below kind of data which I created by myself based on your relationship.

 

I created a calculated column in the Submaster table and a calculated measure in the Account table to solve the problem.

 

Please try.

 

Check if email exisits across linked tables.PNG

 

Column = LOOKUPVALUE(Party[EMAIL],Party[PAR_NUM],Submaster[PAR_NUM])

Measure 5 = IF(ISBLANK(CALCULATE(MAX(Submaster[Column]))),0,1)

 

Aiolos Zhao

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi @PanosIWA ,

 

Because you don't show your sample data, so I don't know what kind of data you have.

 

Assuming that you have the below kind of data which I created by myself based on your relationship.

 

I created a calculated column in the Submaster table and a calculated measure in the Account table to solve the problem.

 

Please try.

 

Check if email exisits across linked tables.PNG

 

Column = LOOKUPVALUE(Party[EMAIL],Party[PAR_NUM],Submaster[PAR_NUM])

Measure 5 = IF(ISBLANK(CALCULATE(MAX(Submaster[Column]))),0,1)

 

Aiolos Zhao

Thank you for  your response.  This apears to be working (hard to validate cause there are so many records.  The only problem I am having now is that I can't use the measure column in the account table to show (count) how many accounts have email vs. don't..   to track percentage of accounts with no email. 

So here is some data (attached)  to better explain what I am after.   The two formulas you gave me worked well, but I cannot use the new measure on the account table to build a visual to total number of "Yes Emails" vs. "No Emails". 

I am tring to build a chart that shows each officer name and the number of accounts still without emails (outstanding count and maybe percentage of total, etc. ). 

 

Thanks so much again.  This is a huge help for me.  Let me know if i can provide you with anything else that would help.2-26-2020 6-08-52 PM.jpg

Anonymous
Not applicable

Hi @PanosIWA ,

 

I added the OFFICE in my example data as the below screenshot, I think you just need to add one more measure, and then put the OFFICER and new measure into a bar chart, then it will show what you want, please try.

 

NO EMAIL = CALCULATE(DISTINCTCOUNT(Account[ACC_NAME]),FILTER(Account,[Measure 5] = "NO EMAIL"))

 

Check if email exisits across linked tables 2.PNG

 

Aiolos Zhao

Thank you so much.  I created the new measure as instructed which is returning a "1" for all "No Email" records.  However the field is not giving me the option to sum or count... it just shows 1 for each admin/Officer?  See attachment2-26-2020 10-11-14 PM.jpg

Anonymous
Not applicable

you are using the wrong column for distinctcount function...

 

you need to use ACCOUNT_NUMBER, but not OFFICER_NAME...

 

Aiolos Zhao

Ahhhh!  That did it.  You have been a life saver.  I may have a follow up when I recreate this for Phone#.  Because there could be a phone number in one of three different fields (home, mobil, work).  But I have enough to setup email an address.  Thank you so much again. 

 

I repeated the same steps creating a new column and 2 new measures for the address field instead of the email field.  The numbers returned in the bar chart were identicle to the email numbers... so I created a grid and got the results attached, which are not correct.    What am I doint wrong?  Please help.

 

ColumnAddress1 = LOOKUPVALUE
           ('402 EXTRACT - INTERESTED PARTY'[BI3_LEGAL_ADDRESS_1],

          '402 EXTRACT - INTERESTED PARTY'[INTERESTED_PARTY_NUMBER],
            '402 EXTRACT - ACCOUNT SUBMASTER XREF'[INTERESTED_PARTY_NUMBER])

 

AA_MeasureAddress1 = IF(ISBLANK(CALCULATE(MAX(
                     '402 EXTRACT - ACCOUNT SUBMASTER XREF'[ColumnAddress1]))),
                     "No Address1", "Yes")

 

AA MeasureAddress1Calc = CALCULATE(DISTINCTCOUNT(
                         '402 EXTRACT - ACCOUNT'[ACCOUNT_NUMBER]), FILTER(
                         '402 EXTRACT - ACCOUNT',[AA_MeasureAddress1]
                          = "No Address1"))

Address1.jpg
  

Anonymous
Not applicable

Please show me some sample data so I can get more information.

 

Because basically if there data model is no change, it won't be wrong.

 

Aiolos Zhao

Anonymous
Not applicable

Glad to help you~

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.