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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TaufikMaggangka
Helper II
Helper II

Relationship in direct query mode

Dear All, I need help about relationship in direct query mode. Basically, I have two table. Here my illustration of my issue.

Table 1.

IDID StudentName StudentCovidSymptoms
11111AFever
22222BCough
33333CLoss of smell
44444DFatigue
55555EFever

 

Table 2.

IDScreenerIDID StudentAntigenResult
122222Positive
255555Negative
333333Not Tested

 

I Try to create relationship between " ID" in table 1 and "ScreenerID" in table 2 because the value have same unique value. I create "one to one" Cardinality" and cross filter direction "Both"(Note: Sigle cannot be apply). But the result I got is messy, Here my result when I try to create a table visual:

ID StudentName StudentCovidSymptomsAntigen Result
1111AFever 
1111AFeverPositive
1111AFeverNegative
1111AFeverNot Tested
2222BCough 
2222BCoughPositive
2222BCoughNegative
2222BCoughNot Tested
3333CLoss of Smell 
3333CLoss of SmellPositive
3333CLoss of SmellNegative
3333CLoss of SmellNot Tested
4444DFatigue 
4444DFatiguePositive
4444DFatigueNegative
4444DFatigueNot Tested
5555EFever 
5555EFeverPositive
5555EFeverNegative
5555EFeverNot Tested


Basically, Every ID have 4 value even ID that not consist in the table 2.

I Hope ther result will be like this :

ID StudentName StudentCovidSymptomsAntigen Result
1111AFever 
2222BCoughPositive
3333CLoss of SmellNot Tested
4444DFatigue 
5555EFeverNegative


Anyone can help, I am new with power bi :). Anyhelp will be really appreaciated.

Thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@TaufikMaggangka , Make it one to Many and bi-directional and try. Or you need to have a common table for

ID ID Student Name

 

And use that. 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

This requires a Join and not relationship.

 

In Power Query Do a LeftJoin:

Table 1 LeftJoin Table2

 

Also, if you can explain a bit more on unique columns in both the tables, it would be helpful.

 

Hi @Anonymous ,

Unique values is ID on this case. the unique value have same value for each data registered. 

Basically, we have 2 form to input the data on the database. the first form is about screener table, the purpose of this table to screen student which have covid symptoms. the ID is unique value that fill automatically. the second form is to submit antigen result for each student that have screen. the id on the first table and second table have same unique value. it is why I thought it can be done with relationship.

Any more explananation about left join table on my cases will be really appreciate. I am not resolve this issue yet.

amitchandak
Super User
Super User

@TaufikMaggangka , Make it one to Many and bi-directional and try. Or you need to have a common table for

ID ID Student Name

 

And use that. 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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