Forum Discussion
3 Tables with Relationship
- 2 years ago
Hi Linschiiii, Hope you are doing good!
Your problem arises from the inactive relationship between Table B and Table C. In Power BI, inactive relationships do not automatically filter data unless explicitly activated using DAX functions. Here's how you can address this issue:Activate the Relationship Using DAX: Use the USERELATIONSHIP function to activate the inactive relationship in your measures. You need to create measures for the counts in Table B and Table C separately, activating the relationship for Table C.
Create Measures: Create measures for counting the fruits in both Table B and Table C. Use the USERELATIONSHIP function to activate the relationship for Table C.
Here's an example of how you can create these measures:
Fruits_Count_TableC =
CALCULATE(
COUNTROWS('Table C'),
USERELATIONSHIP('Table B'[Fruit], 'Table C'[Fruit])
)Add these measures to your matrix instead of the direct column counts. This will ensure that the inactive relationship is taken into account for Table C.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Hi Linschiiii, Hope you are doing good!
Your problem arises from the inactive relationship between Table B and Table C. In Power BI, inactive relationships do not automatically filter data unless explicitly activated using DAX functions. Here's how you can address this issue:
Activate the Relationship Using DAX: Use the USERELATIONSHIP function to activate the inactive relationship in your measures. You need to create measures for the counts in Table B and Table C separately, activating the relationship for Table C.
Create Measures: Create measures for counting the fruits in both Table B and Table C. Use the USERELATIONSHIP function to activate the relationship for Table C.
Here's an example of how you can create these measures:
Fruits_Count_TableC =
CALCULATE(
COUNTROWS('Table C'),
USERELATIONSHIP('Table B'[Fruit], 'Table C'[Fruit])
)
Add these measures to your matrix instead of the direct column counts. This will ensure that the inactive relationship is taken into account for Table C.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
- Linschiiii2 years agoNew Member
Many thanks!! now it Works!