Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Folks,
Thanks for the support for a beginer .
Need the help to understand one scenario in RLS.
here, there is 3 users and need to implement RLS dynamically .
scenario is that there is one landing page and 3 other pages named dashbord1,2 and 3.
when person1 logins,he only able to see the KPI1,KPI2 and KPI3 and should have access to other pages .Like this,need to implement for multiple users .Please help me to find a way
Person1 | ||
KPI1 | KPI2 | KPI3 |
Dashboard1 | Dasbhoard2 | Dashboard3 |
Person2 | ||
KPI4 | KPI5 | |
Dashboard1 | Dasbhoard2 | Dashboard3 |
Person2 | ||
KPI6 | ||
Dashboard1 | Dasbhoard2 | Dashboard3 |
regards
Ashik
Solved! Go to Solution.
Hi @ashikts ,
You can try to use a Card visual to work as a mask for some KPIs.
Method 1:
1. Create measures like so:
Make Transparent of KPI1 & KPI2 & KPI3 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person1@domain.com", "#FFFFFF00", "White" )
Make Transparent of KPI4 & KPI5 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person2@domain.com", "#FFFFFF00" ,"White")
Make Transparent of KPI6 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person3@domain.com", "#FFFFFF00" ,"White")
2. Create card visuals.
3. Test.
Method 2:
1. Create measures like so:
KPI1 & KPI4 & KPI6 =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI1 Value",
"Person2@domain.com", "KPI4 Value",
"Person3@domain.com", "KPI6 Value"
)
KPI1 & KPI4 & KPI6 Title =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI1 Title",
"Person2@domain.com", "KPI4 Title",
"Person3@domain.com", "KPI6 Title"
)
KPI2 & KPI5 =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI2 Value",
"Person2@domain.com", "KPI5 Value"
)
KPI2 & KPI5 Title =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI2 Title",
"Person2@domain.com", "KPI5 Title"
)
KPI3 =
SWITCH ( USERPRINCIPALNAME (), "Person1@domain.com", "KPI3 Value" )
KPI3 Title =
SWITCH ( USERPRINCIPALNAME (), "Person1@domain.com", "KPI3 Title" )
Make Transparent of KPI2 & KPI5 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF (
CurrentUser IN { "Person1@domain.com", "Person2@domain.com" },
"#FFFFFF00",
"White"
)
Make Transparent of KPI3 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person1@domain.com", "#FFFFFF00", "White" )
2. Create card visuals.
3. Test.
BTW, .pbix file attached.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @ashikts ,
You can try to use a Card visual to work as a mask for some KPIs.
Method 1:
1. Create measures like so:
Make Transparent of KPI1 & KPI2 & KPI3 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person1@domain.com", "#FFFFFF00", "White" )
Make Transparent of KPI4 & KPI5 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person2@domain.com", "#FFFFFF00" ,"White")
Make Transparent of KPI6 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person3@domain.com", "#FFFFFF00" ,"White")
2. Create card visuals.
3. Test.
Method 2:
1. Create measures like so:
KPI1 & KPI4 & KPI6 =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI1 Value",
"Person2@domain.com", "KPI4 Value",
"Person3@domain.com", "KPI6 Value"
)
KPI1 & KPI4 & KPI6 Title =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI1 Title",
"Person2@domain.com", "KPI4 Title",
"Person3@domain.com", "KPI6 Title"
)
KPI2 & KPI5 =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI2 Value",
"Person2@domain.com", "KPI5 Value"
)
KPI2 & KPI5 Title =
SWITCH (
USERPRINCIPALNAME (),
"Person1@domain.com", "KPI2 Title",
"Person2@domain.com", "KPI5 Title"
)
KPI3 =
SWITCH ( USERPRINCIPALNAME (), "Person1@domain.com", "KPI3 Value" )
KPI3 Title =
SWITCH ( USERPRINCIPALNAME (), "Person1@domain.com", "KPI3 Title" )
Make Transparent of KPI2 & KPI5 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF (
CurrentUser IN { "Person1@domain.com", "Person2@domain.com" },
"#FFFFFF00",
"White"
)
Make Transparent of KPI3 =
VAR CurrentUser =
USERPRINCIPALNAME ()
RETURN
IF ( CurrentUser = "Person1@domain.com", "#FFFFFF00", "White" )
2. Create card visuals.
3. Test.
BTW, .pbix file attached.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
@ashikts , RLS can filter data, but can hide measure. But that possible using external tools
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2020-feature-summary/#_Perspectives
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |