Forum Discussion

po's avatar
po
Post Prodigy
4 years ago
Solved

RLS - row level security and OR operator

Hi,   We have following situation   3 tables   sales table   distributor_number, seller_number, sales_qty 1                                1                     10 1                        ...
  • v-luwang-msft's avatar
    4 years ago

    Hi  po ,

    You can apply RLS to the main table (sales table) instead of the RLS table and check like this:

     

    CONTAINS (
        distributor_table,
        distributor_table[distributor_name], "joe bloggs",
        distributor_table[distributor_number], 'sales table'[distributor_number]
    )
        || CONTAINS (
            'seller table',
            'seller table'[seller_name], "joe bloggs",
            'seller table'[seller_number], 'sales table'[seller_number]
        )

     

     

    You could download my pbix file if you need.

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien