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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rachel_tsao
Frequent Visitor

Getting "#ERROR" from Related() even if there is relationship

Hi Experts,

I added a new column name [Check Item] = RELATED('Mapping - Expense'[TM1 Account]) , want to get the first [Item] from another table 'Mapping -Expense' , but it getting "#ERROR" (image 1), it seems the Many-Many cardinality caused this issue(image 2), anyone know how can I get the first [Item] from table 'Mapping - Expense' as output? thanks!

image 1

Rachel_tsao_0-1711454808253.png

image 2

Rachel_tsao_1-1711455363387.png

 

Thanks,

Rachel

 

4 REPLIES 4
v-yilong-msft
Community Support
Community Support

Hi @Rachel_tsao ,

Image 2 is just a warning and not a bug, but I would recommend that you do not use many-to-many relationships to build relationships as they can lead to ambiguous and complex models that are difficult to use.
I have created two similar tables based on your description.

vyilongmsft_1-1711507924558.png

vyilongmsft_2-1711507941249.png

I think you can use Index in two tables.

vyilongmsft_3-1711507999514.png

vyilongmsft_4-1711508040506.png

Finally you will get what you want.

Column = RELATED('Mapping-Expense'[Item])

vyilongmsft_5-1711508104837.png

 

 

 

Best Regards

Yilong Zhou

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

 

Hi v-yilong,

Thanks for your advise, however currently "TM1 Account" is simultaneously linking to multiple different data requirements, change the column setting or relationship might impact to other reports, so I would like to avoid this option. Therefore, I was wondering if it’s possible to return just first "Item" record while still maintaining the many-to-many scenario.

Thanks, Rachel

Hi @Rachel_tsao ,

I don't think it's realistic to want to maintain a many-to-many relationship in this .pbix file, and it seems that the best option at the moment is not to use a many-to-many relationship, but rather a one-to-many or many-to-one relationship, for many-to-many relationships I think you can check out this document, maybe it can help you: Many-to-many relationship guidance - Power BI | Microsoft Learn

 

 

Best Regards

Yilong Zhou

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

Hi Yilong Zhou,

Understood, thank for the valuable adivse, I will try few more way to not change the current relationship, if there is no better solution in the end, I will try your suggedtion to change to one-to-many relationship .

Thanks,

Rachel

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.