Forum Discussion
Showing Report based on User login and Org. chart
Hi ADSL
Try the following code in RLS
var a=LOOKUPVALUE ( 'SalesRep'[Employee_ID], 'SalesRep'[Email], USERPRINCIPALNAME () )
return CONTAINSSTRING( 'SalesRep'[Path],a)
2.Then create a new table and hide it.
Table = SUMMARIZE(SalesRep,[Employee_ID])
3.Then create a measure and put it to the visual filter.
MEASURE =
VAR a =
LOOKUPVALUE ( SalesRep[Pathlength], SalesRep[Email], USERPRINCIPALNAME () )
RETURN
IF (
a <> 1
&& COUNTROWS ( ALL ( 'Table' ) ) = COUNTROWS ( ALL ( SalesRep ) ),
1,
IF (
( a = 3 )
|| ( a = 4 )
|| (
a = 1
&& MAX ( SalesRep[Level 3] ) = BLANK ()
)
|| (
a = 2
&& MAX ( SalesRep[Level 4] ) = BLANK ()
),
1
)
)
Test it .
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ADSL2 years ago
Post Prodigy
Hi Anonymous,
Thank you for helpful feedback.
But it doesn't show any result of these user account [email protected] or [email protected] when login as your output screenshot.
Actually it should show the result of Supervisor01, Supervisor02,...etc.
Any suggestion/advise of this case?
Thanks and Regards,
- Anonymous2 years agoNot applicable
Hi ADSL
Actually, when there is no rls applied in the matrix, the value is also blank, you need to check your measure.
Best Regards!
Yolo Zhu
- ADSL2 years ago
Post Prodigy
Hi Anonymous,
I'm also a bit challenge of this case.
May I need your support of this measure to apply?
Thanks and Regards,