Forum Discussion
Table visualization error due to missing relationship
Hi all!
I need to display a table visual in Power BI with fields from the following tables: Tags, Models, and Spare Parts. If I add the Tags and Models fields or the Spare Parts and Models fields, it works, but as soon as I add all three Tags, Spare Parts, and Model it throws an error.
Keep in mind that I cannot directly link Tags with Spare Parts. The Spare Parts Models table is theoretically a bridge table between Tags and Spare Parts.
If I aggregate the spare_parts field in count/first/last, I can view it.
These are the relationships I have.
Thanks
9 Replies
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - rajendraongole1Super User
Hi Fern_21 - Since the tags table isn't directly related to spare_parts, create a measure to retrieve the associated spare parts. Use a Measure Instead of Direct Fields as like below
Eg:
Spare_Part_List =
VAR _SpareParts = CONCATENATEX(
RELATEDTABLE(spare_prts_models),
spare_parts_models[id_spare_part],
", "
)
RETURN _SparePartsHope this helps.
- Fern_21Helper V
Hi rajendraongole1 !
Can I use this measure to correctly display the spare_part field within the table?- rajendraongole1Super User
yes ofcourse, use it as per your shared snapshot. I have used table names. please check the table names and use it.
Let me know if it works, if not please share some sample data for reference by removing the sensitive data in your pbix file.
- v-sathmakuriCommunity Support
Hi Fern_21 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- v-sathmakuriCommunity Support
Hi Fern_21 ,
I hope this information proves helpful. Feel free to reach out if you have any further questions or would like to discuss this in more detail. If responses provided answers your question, please accept it as a solution so other community members with similar problems can find a solution faster.
Thank you!!