Forum Discussion

JonathanDavey1's avatar
4 years ago
Solved

Filter All Pages using Users Domain using "Measure" feature

Hi, I would like to Filter BI-Reports using the Users Domain. I am able to grab the User using Measure = Username() I would have thought it simple to drag this Measure accross to Filter On All Pag...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi JonathanDavey1 ,

     

    I have created a data sample and include the actual domain for "C".

     

    Please try to create a measure, and apply it to visual-filter pane, set as "is 1":

    Domain measure = 
    var _pos=FIND("\", USERNAME())
    var _domain=LEFT(USERNAME(),_pos-1)
    return IF(CONTAINSSTRING(MAX('Table'[Include domains]),_domain),1,0)

    Output:

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.