This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello Everyone.
I have this Relationship between two tables:
I created those measures:
It works Perfect but when i Implement RLS Role i get this Error:
I understand that it happends because i am filtering my Dim Table but i dont know how to fix it, I know i can split the main table into two tables but maybe some one have better idea?
Thank you.
Solved! Go to Solution.
HI @Anonymous,
I mean you can extract the corresponding item list from the target table without active fact relationship. Then you can use this list as condition in your Dax expression to filter calculation records.
formula =
VAR IDlist =
CALCULATETABLE (
VALUES ( 'DWH Dim_Neighborhoods'[NeighborhoodID] ),
ALLSELECTED ( 'DWH Dim_Neighborhoods' ),
VALUES ( 'DWH Dim_Neighborhoods'[NeighberhoodNameHEB] )
)
RETURN
CALCULATE (
SUM ( 'DWH Fact_ImigrationInCity'[Quantity] ),
FILTER (
ALLSELECTED ( 'DWH Fact_ImigrationInCity' ),
'DWH Fact_ImigrationInCity'[NeigheberhoodTargetID] IN IDlist
)
)
Regards,
Xiaoxin Sheng
Thank you!
An alternative solution can be found here.
https://www.villezekeviking.com/alternative-to-userelationship/
HI @Anonymous,
Perhaps you can try to extract the value from other table and manually apply in expression calculations instead of use relationship functions. They should not affect the RLS usages.
Regards,
Xiaoxin Sheng
Thanks for your cooment.
I tried this DAX code:
#test = CALCULATE( sum('DWH Fact_ImigrationInCity'[Quantity]), FILTER( 'DWH Fact_ImigrationInCity', 'DWH Fact_ImigrationInCity'[NeigheberhoodTargetID] = CALCULATE( MAX('DWH Dim_Neighborhoods'[NeighborhoodID]), 'DWH Dim_Neighborhoods'[NeighberhoodNameHEB] = SELECTEDVALUE('DWH Dim_Neighborhoods'[NeighberhoodNameHEB])) ),ALL('DWH Fact_ImigrationInCity') )
thats what you mean?
it doesnt works for me.
HI @Anonymous,
I mean you can extract the corresponding item list from the target table without active fact relationship. Then you can use this list as condition in your Dax expression to filter calculation records.
formula =
VAR IDlist =
CALCULATETABLE (
VALUES ( 'DWH Dim_Neighborhoods'[NeighborhoodID] ),
ALLSELECTED ( 'DWH Dim_Neighborhoods' ),
VALUES ( 'DWH Dim_Neighborhoods'[NeighberhoodNameHEB] )
)
RETURN
CALCULATE (
SUM ( 'DWH Fact_ImigrationInCity'[Quantity] ),
FILTER (
ALLSELECTED ( 'DWH Fact_ImigrationInCity' ),
'DWH Fact_ImigrationInCity'[NeigheberhoodTargetID] IN IDlist
)
)
Regards,
Xiaoxin Sheng
I really appreciate it, Thank you.
It works good but i slice my graph also with Date table, What should i add to the formula that it will work also with slice the graph by years?
this is the date table column name :
Thank you!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 45 | |
| 20 | |
| 18 | |
| 18 |