powerbipowerbi-embedded

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


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


Solution

  • 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]
    )