Forum Discussion
multiple relations from a table to another
Dear All,
I have the following fact table:
| Item | € | Color (index) | Type (index) |
| Item 1 | 1000 | 1 | 2 |
| Item 2 | 2000 | 3 | 4 |
| Item 3 | 2500 | 3 | 5 |
| Item 4 | 3000 | 6 | 7 |
Then I have the following "text" table:
| Index | value |
| 1 | green |
| 2 | bracelet |
| 3 | red |
| 4 | ring |
| 5 | necklace |
| 6 | white |
| 7 | earring |
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
- Anonymous3 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
- AnonymousNot 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. -