Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
1 year ago
Solved

RLS only on one page

is it possible to set up RLS only on specific page of report ? I have three pages in my report , I want to set up RLS only on home page and rest of the two pages should show all data for all users

  • Hi powerbiexpert22 ,

     

    Thanks for reaching out to the community!

    In Power BI, Row-Level Security (RLS) is applied at the dataset level, not at the report page level. This means that once you set up RLS, it affects all visuals and all pages that use data from that dataset. Unfortunately, it’s not possible to apply RLS to only one page while letting other pages show all data to all users within the same report.

    Possible Workarounds:

    1. Separate Reports:
      You can create two separate reports:

      • One with RLS applied (for your “home page” scenario).
      • One without RLS (for the pages that should show all data).
        You can then share the links to each report as needed.
    2. Bookmarks or Navigation:
      If you want a seamless experience, you can use bookmarks or report navigation buttons to guide users between the two reports.

    3. Custom Visual Filtering (Advanced):
      With some advanced DAX and user role logic, you may be able to show/hide visuals or display different data, but true RLS cannot be selectively enabled by page.

    References:

    Hope this clarifies the limitation. If you have any more questions or need help with a workaround, feel free to ask! If this post helps, please consider giving a kudos and marking it as a solution to help other community members.

    Thank you!
    translation and formatting supported by AI

4 Replies

  • Hi powerbiexpert22 ,

     

    Thanks for reaching out to the community!

    In Power BI, Row-Level Security (RLS) is applied at the dataset level, not at the report page level. This means that once you set up RLS, it affects all visuals and all pages that use data from that dataset. Unfortunately, it’s not possible to apply RLS to only one page while letting other pages show all data to all users within the same report.

    Possible Workarounds:

    1. Separate Reports:
      You can create two separate reports:

      • One with RLS applied (for your “home page” scenario).
      • One without RLS (for the pages that should show all data).
        You can then share the links to each report as needed.
    2. Bookmarks or Navigation:
      If you want a seamless experience, you can use bookmarks or report navigation buttons to guide users between the two reports.

    3. Custom Visual Filtering (Advanced):
      With some advanced DAX and user role logic, you may be able to show/hide visuals or display different data, but true RLS cannot be selectively enabled by page.

    References:

    Hope this clarifies the limitation. If you have any more questions or need help with a workaround, feel free to ask! If this post helps, please consider giving a kudos and marking it as a solution to help other community members.

    Thank you!
    translation and formatting supported by AI

  • Hi powerbiexpert22 ,

     

    Try this if it works,

     

    • Create a flag in a DAX measure:

    ShowAllData =

    IF(

      USERNAME() = "[email protected]",

      1,

      0

    )

    • Use this flag to show/hide buttons or redirect users:
      • On the "home" page: Show filtered visuals via RLS.
      • On other pages: Use measures that ignore RLS using ALL() or switch visuals based on the ShowAllData flag.
  • Hey powerbiexpert22 RLS in Power BI is set on data level, therefore the data will be filtered not on base of the selected page but on the user's information. This filter will be then valid on the whole report. If you want to make some data available to all, you could think about duplicating the data table and exclude it from the filters.

     

    However, my question is why do you want to use RLS only on the first page?

    Can you please share an example of your data structure?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  powerbiexpert22 ,

    Thanks for reaching out to the Microsoft fabric community forum.



    Create RLS Role - 
    [UserDepartment] = USERPRINCIPALNAME()

    Create a Page Identifier Table

    Create a disconnected parameter to identify current page -
    CurrentPage = "Home" -- change this per page using bookmarks or slicers

    Modify your Measures to respect RLS only on Home page

    Sales_Measure_RLS_OnlyOnHome =
    VAR IsHomePage = SELECTEDVALUE(PageAccessControl[PageName]) = "Home"
    RETURN
    IF(
    IsHomePage,
    CALCULATE([Sales], RLS_Security_Filter),
    [Sales] -- Show unfiltered data on other pages
    )

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

    Best Regards,
    Sreeteja.
    Community Support Team