Forum Discussion
Linking Parent and Child Items, Data in the same Table
- 4 years ago
Hi lbendlin ,
thank you for your reply as well as the solution which really seems to be working when using the right mode! Unfortunately, I can not use the Storage Mode Import for the tables in question (Items & Order Lines).
But I think I managed to get what I need (although I'm not 100% satisfied).
I just connected the Items table several times and used DirectQuery for every additional table.Then I linked the tables with each other:
- OrderLines.ItemID < Items.ItemID
- Items.ItemID <> Items(1).ItemID
- Items(1).ParentID <> Items(2).ItemID
- Items(2).ParentID <> Items(3).ItemID
Maybe this is helpful to others as well who purely use DirectQuery.
I'm not saying that this is the best approach and I'm really sure it isn't. But maybe it's something to work with.
Your hierarchy column isn't really needed. Here is a sample implementation based on PATH(). You may need to check if that will work with your data source (make sure to enable the local data model option). See attached.