Forum Discussion

gianmarco's avatar
gianmarco
Helper IV
3 years ago
Solved

multiple relations from a table to another

Dear All,

I have the following fact table:

ItemColor (index)Type (index)
Item 1100012
Item 2200034
Item 3250035
Item 4300067

 

Then I have the following "text" table:

Indexvalue
1green
2bracelet
3red
4ring
5necklace
6white
7earring

 

What I would like to do is connect "text" table to the each indexed column (color and type) of the fact table.

Problem is I can only do it once beacuse every relation in addition to the first become inactive.

What is the best way I can do this? Is there a way I can connect "text" table to each indexed column of the fact table via the Index column or shall the model be revisited?

 

Thank you very much

gianmarco

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi gianmarco ,

    Please refer to USERELATIONSHIP function (DAX) - DAX | Microsoft Learn and RELATED function (DAX) - DAX | Microsoft Learn.

    • The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. If a relationship does not exist, you must create a relationship.

    • The userelationship function returns no value; the function only enables the indicated relationship for the duration of the calculation.

    You can refer to the following article to use them.

    USERELATIONSHIP in calculated columns - SQLBI

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi gianmarco ,

    Please refer to USERELATIONSHIP function (DAX) - DAX | Microsoft Learn and RELATED function (DAX) - DAX | Microsoft Learn.

    • The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. If a relationship does not exist, you must create a relationship.

    • The userelationship function returns no value; the function only enables the indicated relationship for the duration of the calculation.

    You can refer to the following article to use them.

    USERELATIONSHIP in calculated columns - SQLBI

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.