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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply

To Bring information of two related tables

Hi,

 

I have two tables. ("Base N2" and "Base N3", 1-to-many relationship). I need to create a chart to show:

1) The "ticket numbers" that are in the two tables.

2) The "ticket numbers" that are in table "Base N2" but are not in table "Base N3".

 

In the table "Base N3 ", I can use the "related" in the formula and I can show the data that are in the two tables (picture below), however, I do not I can use "reletad" in the formula in "Base N2" to resolved the item 2, because of the relationship of the tables.

 

Can you help me?

 

Thanks in advance.

 

Example.png

 

Best Regards,

Renato

2 ACCEPTED SOLUTIONS

Hi @v-huizhn-msft,

 

Reinforcing my question...

 

With the formula below, I can get the "tickets number" from the BaseN2 table and that are also in the BaseN3 table.

 

01.JPG

 

Now, I need to show all tikets that are in BaseN2 and are not in Base N3. (Follows below an example in excel )

 

02.JPG

 

Follows the relationship between the two tables.

 

03.JPG

 

Best Regards,

Renato França

View solution in original post

Hi @renatofrancavr,

You'd better add middle table including the distinct value in column ticket, then create a 1 to 1 relationship between base2 and mid-table. I try to reproduce your scenario and get desired result as follows.

I have table2 and table3 like the screenshot, and there are one(Table2) to many(Table3) relationship between the two tables.

 
1.png2.png

First, create a middle table using the following formula and get a new table.

Mid-Table = DISTINCT(Table3[Ticket])




Then create a relationship between table2 and middle table.

22.png

In table 2, you can create a calculated column using the formula below. Create a table, select the Employee and column as values, you will get the expected result.

 

Result = IF(ISBLANK(RELATED('Mid-Table'[Ticket])),"Not found",RELATED('Mid-Table'[Ticket]))


33.png

If you have any other question, please let me know.

Best Regards,
Angelia

View solution in original post

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @renatofrancavr,

Could you please post the formula including related function for further analysis?

Best Regards,
Angelia

Hi @v-huizhn-msft,

 

Reinforcing my question...

 

With the formula below, I can get the "tickets number" from the BaseN2 table and that are also in the BaseN3 table.

 

01.JPG

 

Now, I need to show all tikets that are in BaseN2 and are not in Base N3. (Follows below an example in excel )

 

02.JPG

 

Follows the relationship between the two tables.

 

03.JPG

 

Best Regards,

Renato França

Hi @renatofrancavr,

You'd better add middle table including the distinct value in column ticket, then create a 1 to 1 relationship between base2 and mid-table. I try to reproduce your scenario and get desired result as follows.

I have table2 and table3 like the screenshot, and there are one(Table2) to many(Table3) relationship between the two tables.

 
1.png2.png

First, create a middle table using the following formula and get a new table.

Mid-Table = DISTINCT(Table3[Ticket])




Then create a relationship between table2 and middle table.

22.png

In table 2, you can create a calculated column using the formula below. Create a table, select the Employee and column as values, you will get the expected result.

 

Result = IF(ISBLANK(RELATED('Mid-Table'[Ticket])),"Not found",RELATED('Mid-Table'[Ticket]))


33.png

If you have any other question, please let me know.

Best Regards,
Angelia

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.