Forum Discussion
Joining to a filtered table
- 1 year ago
I have discovered that relationships are broken in some way between Direct Query tables and calculated tables, so I am unable to use the calculated table measure as a slicer to filter Direct Query data in the visuals.
While it is possible that converting or duplicating some of the Direct Query tables to Import mode would solve the broken relationship issue, the underlying problem I was trying to solve was to highlight SKU&Subsidiaries incorrectly marked as not replenishable. Since I am having so much trouble with the slicer, I have decided to focus on the more correct solution to this underlying problem, which is to work with the upstream data support teams to fix the source data.
Partial solution: don't bother joining to product and subsidiary, use summarize instead of select columns, make multiple tables instead of trying to do it all in one step.
It's only partial because I still can't get Power BI to recognize the relationship between Replenishable and the Product/Subsidiary dim tables.
Maybe I need to create relationships to all the various fact tables instead? (There are a lot - Actuals, CFO Forecast, Demand Planning Forecast, DC Inventory, Stores ISP, and Supply are the ones referenced in my matrix - and they all have their own relationships back to Product and Subsidiary.) But maybe the problem is fundamentally related to direct query tables vs local tables and that won't work either.
Table code:
ReplenishOnly =
SUMMARIZE (
FILTER (
'Stores ISP',
'Stores ISP'[Stores Replenish] > 0
&& 'Stores ISP'[SnapshotDate] > TODAY () - 8
),
'Stores ISP'[ProductID],
'Stores ISP'[SubsidiaryID]
)
ReplenishAll =
SUMMARIZE (
'Stores ISP',
'Stores ISP'[ProductID],
'Stores ISP'[SubsidiaryID]
)
Replenishable =
ADDCOLUMNS (
'ReplenishAll',
"Replenishable",
IF (
NOT ISBLANK (
LOOKUPVALUE (
ReplenishOnly[ProductID],
ReplenishOnly[ProductID], ReplenishAll[ProductID],
ReplenishOnly[SubsidiaryID], ReplenishAll[SubsidiaryID]
)
),
TRUE,
FALSE
)
)
- v-aatheeque1 year ago
Community Support
Hi shadowsong42 ,
Thank you for the response and providing the solution. We want to kindly follow up to check if the issue is resolved? if yes, kindly mark the helpful answer as a solution if you feel that makes sense. More people in the community will benefit from the thread.
- v-aatheeque1 year ago
Community Support
Hi shadowsong42 ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!Thank you!
- v-aatheeque1 year ago
Community Support
Hi shadowsong42
Have you resolved the issue? If yes, please mark it as Accept Answer and click Yes if you found it helpful.Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!