Forum Discussion

coriben's avatar
coriben
Icon for Helper I rankHelper I
8 years ago
Solved

Permissions in the Role Manager with DAX

Hello, I’m trying to configure the permissions on my report to use Row Level Security in the Embedded version later.   I have the following table structure (This will be improved later, right now I...
  • coriben's avatar
    coriben
    8 years ago

    Hello, thanks for your input. It's an App owns Data scenario, but I got it to work.

    First, I included 2 fields in the bridge table so I don't need the Users and permissions tables anymore:
    Username and Branch_name.

    Then, the following DAX that I found did it:

    [Data_table_branch_column]
        IN CALCULATETABLE (
            VALUES ( 'bridge_table'[Branch_name] ),
            FILTER (
                ALL ( 'bridge_table' ),
                [Username] = USERNAME ()
                    || [Username] = USERPRINCIPALNAME ()
            )
        )