Forum Discussion
dinesh123
3 years agoHelper II
Embedded RLS
tamerj1 Hi all, We are using Embedding Power BI. In that we are using RLS. In general secenarios, RLS works based on Username(), Userprincipalname() where it will return either user name or user e...
- 3 years ago
dinesh123
Please try= [Child_code] IN VAR Input = USERNAME () VAR Length = LEN ( Input ) VAR IndexSep = COALESCE ( FIND ( ":", Input, 1, BLANK () ), Length ) VAR String = IFERROR ( RIGHT ( Input, Length - IndexSep ), BLANK () ) VAR String2 = COALESCE ( String, CONCATENATEX ( VALUES ( ChildOrg[Child_code] ), ChildOrg[Child_code], "," ) ) VAR Items = SUBSTITUTE ( String2, ",", "|" ) VAR Length = COALESCE ( PATHLENGTH ( Items ), 1 ) VAR T1 = GENERATESERIES ( 1, Length, 1 ) RETURN SELECTCOLUMNS ( T1, "Project", PATHITEM ( Items, [Value] ) )
tamerj1
3 years agoCommunity Champion
Hi dinesh123
Please try
[Program] IN
VAR String = USERNAME ( )
VAR Items =
SUBSTITUTE ( String, ",", "|" )
VAR Length =
COALESCE ( PATHLENGTH ( Items ), 1 )
VAR T1 =
GENERATESERIES ( 1, Length, 1 )
RETURN
SELECTCOLUMNS ( T1, "Project", PATHITEM ( Items, [Value] ) )dinesh123
3 years agoHelper II
For Example:
{
"accessLevel": "View",
"datasetId": "cfafbeb1-*****-a46fb27ff229",
"identities": [
{
"username": "Program code = P1,P2,P3,….":“Child code= C1,C2,C3”
"roles": [
"sales"
],
"datasets": [
"cfafbeb1-******-a46fb27ff229"
]
}
]
}
Here we are passing Program code and Child code from Java SDK, now with your help we are able to pass the multiple program codes, However, can we pass Child code also corresponding to that Program code?
As we are using Program code and child code as two different slicers
Ex:
Program code | Child Code |
P1 | C1 |
P1 | C2,C3 |
P1 | C4 |
P2 | C5,C6 |
P2 | C7 |
- tamerj13 years agoCommunity Champion
If you place USERNAME ( ) in a card visual, what do you see?