Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Kharansu_KR33
Frequent Visitor

RLS with multiple combination

Hi all,

I have provided a table here for some combinations of securities that should be applied to my dashboard. How to achieve it?

1. Can I directly import this table to my model and create relation with my existing tabel?

2. Can the exact combinations be allowed, so that the respective e-mail ids can interact with all or provided combinations?

 

Thanks in advance.

E-mail IDHierarchyCountryZoneStateLocationsPunching Machine
dinesh.g@xyzCountry HeadIndiaAllAllAllAll
bhavesh.s@xyzZonal HeadIndiaEastAllAllAll
sumedh.lakha@xyzZonal HeadIndiaWestAllAllAll
asish.fn@xyzZonal HeadIndiaSouthAllAllAll
simran.kaur@xyzZonal HeadIndiaNorthAllAllAll
ramnujan.g@xyzCountry HeadSrilankaAllAllAllAll
mutthu.pillai@xyzZonal HeadSrilankaEastAllAllAll
hariharan.s@xyzZonal HeadSrilankaWestAllAllAll
dinesh.lamba@xyzZonal HeadSrilankaSouthAllAllAll
dinesh.gopi@xyzZonal HeadSrilankaNorthAllAllAll
paramesh.rr@xyzArea Business HeadIndiaEastOdishaAllAll
rohit.bhatt@xyzArea Business HeadIndiaEastBiharAllAll
kriti.s@xyzArea Business HeadIndiaEastChhattisgarhAllAll
swati.m@xyzArea Business HeadIndiaWestMaharashtraAllAll
jignesh.p@xyzArea Business HeadIndiaWestGujratAllAll
mariam.d@xyzArea Business HeadIndiaWestGoaAllAll
krishna.m@xyzManagerIndiaEastOdishaKalahandiP1
krishna.m@xyzManagerIndiaEastOdishaCuttackP2
ramesh.s@xyzManagerIndiaEastOdishaCuttackP1
ramesh.s@xyzManagerIndiaEastOdishaKalahandiP2
5 REPLIES 5
ibarrau
Super User
Super User

Hi. Yes. You can import the table in order to relate that with the dimension that contains the conditions like something related with country/location. The table might be * to *. I know they say you shouldn't ever do that, but the real answer is "be aware of what you are doing before using that".

You can use a single direction from the rls to the model in order to create a dynamic filter. The more columns you want to use for conditions the more complex the rules of dax will be. Usually when it's one, with a simple usernameprincipal() it's enough, but if you want to compare also a smaller granularity, you might need to build a complex dax inside the dimension besides the rule for the RLS table.

You can check this simple example to get the idea step by step.

https://blog.ladataweb.com.ar/post/652895563673649152/powerbi-seguridad-de-filas-rls-con-regla

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hi ibarrau,

Thank you for responding and clarifying the concept. Just a request, to check the application of the particular RLS; if I create a pbix file and attach it here, can you attach a working version of rls dashboard here?

 

Thanks in advance

Hi. You can check the pbix of the example at my github repo: https://github.com/ibarrau/PowerBi-code/blob/master/PowerBi%20Reports/BlogDemos.pbix

Remember you can test how the role looks like with specific email and rule selected at PBI Desktop.

Regards,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hi. Thanks a lot. But how does Power BI read "All" for a column value and show all the related values for a particular hierarchy and not all the values that the column holds?

Do we need to create a separate column that's the combination of the columns present for a specific row?

Well that's the dax challenge I have mentioned before. You will need to think about a logic asking for the columns and don't filter when "All" or something like that.

Yes, you also have the option of separating a row for each combination without the all. That would make DAX easier because you could build a column for each table (RLS table and dimension) that matches exactly for the rows to filter.

I hope that make sense


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors