Forum Discussion
PBI_DAX_Newbie
2 years agoNew Member
How to create a proper Multi-(IN) Clause DAX Query
Hello, My Scenario I am trying to implement Dynamic RLS in Power BI and I am trying to add filters into my DAX and failing miserably. I am clearly writing it incorrectly and I also receive an er...
- Anonymous2 years ago
Hi PBI_DAX_Newbie ,
You can apply a filter in the table 'Invoices' when create a role with the below formula:
'Invoices'[City] IN CALCULATETABLE ( VALUES ( 'Cities'[City] ), FILTER ( ALL ( 'Cities' ), 'Cities'[State] IN CALCULATETABLE ( VALUES ( 'States'[State] ), FILTER ( ALL ( 'States' ), 'States'[Region] IN CALCULATETABLE ( VALUES ( 'Regions'[Region] ), FILTER ( ALL ( 'UserfTORegionMapping' ), 'UserfTORegionMapping'[EmailAddress] = USERPRINCIPALNAME () ) ) ) ) ) )In addition, you can refer the following links to get it:
Dynamic Row-Level Security in Power BI with NOT IN or NOT EQUAL Rule - RADACAD
Multi-level access rights in Dynamic Row Level Security - Abylon
Best Regards
Anonymous
2 years agoNot applicable
Hi PBI_DAX_Newbie ,
You can apply a filter in the table 'Invoices' when create a role with the below formula:
'Invoices'[City]
IN CALCULATETABLE (
VALUES ( 'Cities'[City] ),
FILTER (
ALL ( 'Cities' ),
'Cities'[State]
IN CALCULATETABLE (
VALUES ( 'States'[State] ),
FILTER (
ALL ( 'States' ),
'States'[Region]
IN CALCULATETABLE (
VALUES ( 'Regions'[Region] ),
FILTER (
ALL ( 'UserfTORegionMapping' ),
'UserfTORegionMapping'[EmailAddress] = USERPRINCIPALNAME ()
)
)
)
)
)
)
In addition, you can refer the following links to get it:
Dynamic Row-Level Security in Power BI with NOT IN or NOT EQUAL Rule - RADACAD
Multi-level access rights in Dynamic Row Level Security - Abylon
Best Regards