We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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 (?).
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 6 | |
| 5 |