Power BI Embedded RLS , split username() and seach not working

40 Views Asked by At

enter image description here

In this username has value is '1,2,3'. How I can split and then check

requirement is split the string then convert each value into number then compare

I tried splitting but not able to find how to do in DAX

1

There are 1 best solutions below

0
Sam Nseir On BEST ANSWER

Cheeky way:

CONTAINSSTRING("," & UserName() & ",", "," & [ContactId] & ",")

Another way closer to SPLIT is using PATHCONTAINS but the delimiter needs to be a | (pipe).

PATHCONTAINS(
  SUBSTITUTE(UserName(), ",", "|"),
  [ContactId]
)