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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply

Making a table to connect different tables

I am trying to connect 3 tables that have different 'Resources' for each value.

Table 1          Table 2                 Table 3

COO              FOO                      BOO

CAA               FAA                      BAA

CFF                FFF                       BEE

                                                  BTT

 

So in table 1 COO equates to FOO in table 2 and BOO in table 3. Table 1 CAA equates to FAA in table 2 and BAA in table 3. However, Table 1 CFF equates to FFF in table 2 and BEE and BTT in table 3.

I can connect Table 1 and Table 2 easily by making a new table that has these values in different columns and then making relationships between the original table and the new table.

The problem is because CFF=FFF=BEE and BTT. I don't know how to put BEE and BTT in the linking table to connect the tables.

Any ideas?

Cheers

1 ACCEPTED SOLUTION

Of course you can!

If you need them to stay separate, forget about the merging and the new table you mentioned, and just do this

Untitled.png

View solution in original post

7 REPLIES 7
Phil_Seamark
Employee
Employee

Hi @michaelsparrow

 

Could you ssplit the data into two columns? 

 

So have Table1 as follows and just link up on Col2?

 

Col1 , Col2
--------------
C ,OO
C ,AA
C ,FFF

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi Phil,

 

That still doesn't solve the problem that there are 3 entities in Table 1, 3 in Table 2 and 4 in table 3.

 

Could you create a new column in Table 3 to combine the two values into just 1 value?

 

So still split as suggested, but create a simple formula to say for Table three

 

where values are X & Y, then just make then X for the purpose of linking


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

ok sounds good, so how do i combine the values of BEE ad BTT? For example:

BOO    4

BCC     6

BEE      7

BTT     11

 

How would I combine BEE and BTT?

Does query merging work in your case?

 

Instead of splitting, you can add a new conditional column for each table as follows:

if column end  with oo then oo, aa then aa, ff then ff

Do this for tables 1 and 2

For table 3 do the following:

if column ends with oo then oo, aa then aa, ee then ff, tt then ff

 

Merge tables 1 and 2 on that new custom column, let's name it table 4.

Merge tables 4 and 3 also on the new custom column, let's name it table 5.

 

You can then remove the new custom columns from table 5 and end up with this

Capture.PNG

 

I am not sure that is exactly what you are asking for and if your real data is actually more complex.

Let me know how it goes!

Hi @SabineOussi,

 

Thanks for the response.

Could I just add a table with those values (enter data) and then link the tables together with relationships rather than merging everything?

 

Cheers

Of course you can!

If you need them to stay separate, forget about the merging and the new table you mentioned, and just do this

Untitled.png

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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