Forum Discussion

sassy0112's avatar
sassy0112
Frequent Visitor
8 months ago
Solved

Exclude Visuals from RLS

Hi,

 

Is it possible to exclude specific visuals on a dashboard from Row Level Security filters?

I have a dashboard with several KPI cards across the top that represent aggregated metrics. The dashboard has a filter that I have excluded these visuals from so the totals will always be displayed. However, now that I've added RLS the KPIs are showing incorrect numbers because it is filtering them based on the RLS. Is there a way around this?

Thanks!

  • Hi Zanqueta,

    I ended up hard coding the numbers in a manually created table that I linked to no other tables which prohibited the RLS from being applied. However your solution is rather interesting, and I could see us using this in the future.

     

    Best,

    sassy0112

4 Replies

Replies have been turned off for this discussion
  • Hello sassy0112,

    RLS cannot control objects on your dashboard. It only controls rows based on a predefined rule.
    What I suggest in your case is control over the metric itself. Take a look at the example I shared with another colleague recently. The theme was to hide the salary:

    We create a table with user allowed to see salary:

    After that, we create a measure to check:

    .UserPermissionSalary = 
    var us = USERPRINCIPALNAME()
    return
    LOOKUPVALUE(dim_PermissionSalary[mail],dim_PermissionSalary[mail],us,BLANK())


    Then, iside de salary measure we control:

    TheSalary = 
    var salary = SUM(Salary[Salary])
    var alowed = [.UserPermissionSalary]
    RETURN
    IF(ISBLANK([.UserPermissionSalary]),BLANK(),salary)

     

    I don't know if that meets your needs. Perhaps if you could share some of your data, we could simulate the behaviour you expect here.


    If this response resolved your issue, please mark it as correct to assist other members of the community.

    • sassy0112's avatar
      sassy0112
      Frequent Visitor

      Hi Zanqueta,

      I ended up hard coding the numbers in a manually created table that I linked to no other tables which prohibited the RLS from being applied. However your solution is rather interesting, and I could see us using this in the future.

       

      Best,

      sassy0112

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi sassy0112 

        Thanks for the update and for sharing the approach you used.

        If any of the suggestions provided helped , it would be great if you could acknowledge that in the thread. This will make it easier for others facing similar issues to identify useful solutions and benefit from your experience as well.

         

         

  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi sassy0112 

    We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.