Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
In my content management system, I can make a relationship between table rows (and their respective IDs).
The original or "base" table is Table 1, and it contains all rows.
I've replicated that table and renamed it Table 2. Table 2 has distinct "Child_IDs" from Table 1.
The two tables - Table 1, and Table 2 - are then related using a one-to-many relationship on "ID" (Table 1) and "Child_ID" (Table 2). See the attached PBIX.
Here's Table 1.
| ID | POSTED_DATE | DOC_NO | TRANS_NO | VENDOR_NO | FISCAL_YR |
| 1 | 20210518 | N45067112 | 199 | VN00001233 | 2019 |
| 1 | 20210518 | N45067112 | 199 | VN00001233 | 2020 |
| 2 | 20210518 | JV43667225 | 300 | 2021 | |
| 3 | 20210518 | R538024467 | 400 | 2007 | |
| 4 | 20210518 | 500 | VN00012544 | 2017 | |
| 5 | 20210518 | 600 | VN00015749 | 2021 |
And Table 2.
| ID | Child_ID |
| 1 | 2 |
| 1 | 3 |
| 4 | 1 |
| 4 | 4 |
| 4 | 5 |
The result I need is a table of columns that distinctly list, in ascending fashion, related dimensions from other IDs. Generally, I prefer to do this in M Query, but I suspect it can be optimized in DAX, as well.
For example...
| ID | POSTED_DATE | DOC_NO | TRANS_NO | VENDOR_NO | FISCAL_YR | FISCAL_YR_CHILD |
| 1 | 20210518 | N45067112 | 199 | VN00001233 | 2019, 2020 | 2007, 2021 |
Any ideas?
1. PBIX file is not attached.
2. I have a follow up question. Will it have a cascading impact through relationship. For example, 4 is related to 1 which is in turn related to 2 & 3. Hence, will the output of 4 contain elements from 2 & 3 as well.
Hello, Vijay. Great questions.
No - there's no expectation for cascading relationships (or any expectatation that they be queried, for that matter).
Apologies - seems I can't upload the sample PBIX.
For context, I've tried to merge and append tables to create a unified solution, but without much luck; and I've attempted a few LOOKUPs and SELECTEDVALUE measures, but no luck there, either. Nor with CONTAINS, but I believe that only returns True(), rather than values (?).
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!