Forum Discussion

ryan_b_fiting's avatar
ryan_b_fiting
Post Patron
3 years ago
Solved

Row Level Security - Allows aggregated data to be seen

Hello Community - 

I have a rather complex problem I think.  So I am setting up my RLS for my reporting that is being rolled out to multiple practices and multiple teams.  Some of the metrics we track Ranks among peers in your practice, Top ranked provider metrics (no names provided, just the metric) so the providers can see how they are tracking in terms of rank and versus the Top dogs numbers.

 

My question comes in here.  Is there a way to keep my dynamic RLS using the UPNs, but still allow the rankings, the Top Provider metrics and the overall average of the practice for the specific metrics?

 

Currently, when I test it out, my provider rank is always 1 out of 1, the Top metric is my metric and the average value is my value.

 

Any help on this would be greatly appeciated.  I am trying to roll this out in the next 2 weeks and am having a hard time figuring out a solution to this.

 

Thanks in advance for any help!

Ryan F.

  • lukiz84's avatar
    lukiz84
    3 years ago

    Sorry, you are right. It's because of "lineage".

     

    Don't create relationships here, but in your Measure for NPE for example do this:

     

    AggregateNPENoRLS = 
        CALCULATE(
            SUM(Aggregate_[NPEs]),
            TREATAS(VALUES(Date_Table[Date]), Aggregate_[Date]),
            TREATAS(VALUES(Provider_Table[Provider Name], Aggregate_[Provider Name])
        )

     

    (you can also use AVG(Aggregate_[NPEs]) - I think that would make more sense in this case.

     

    TREATAS transfers the filter to the Aggregate_ Table without having to use a relationship. (thats becase of lineage - if you want to learn more about it, see Understanding data lineage in DAX - SQLBI)

     

    BR

     

10 Replies