Forum Discussion
ADSL
Post Prodigy
2 years agoShowing Report based on User login and Org. chart
Hi BI Community Team, Currently I have an issue of report display and show when user login and check it. We have 04 levels as the screenshot below, as per expectation want to see report when logi...
Anonymous
2 years agoNot applicable
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.