Forum Discussion

soldous's avatar
soldous
Advocate II
6 years ago
Solved

Dynamic slicer based on USERNAME()

Hi to all PBI masters,   I have a table with all my data and I need to implement a slicer which would filter the data only to my records based on currently logged user. But I need to use ChicletSli...
  • v-lionel-msft's avatar
    v-lionel-msft
    6 years ago

    Hi soldous ,

     

    I have the two tables.

    1. Create such a table visual.

    2. Create such a measure.

    __filter = 
    IF(
        SELECTEDVALUE('User table'[User]) = USERNAME(),
        1, 0
    )

    3. Create two buttons.

    4. Create two bookmarks

    5. Add the 'before filtering' bookmark to the 'Back' button and add 'after filtering' bookmark to the 'Mine' button.

     

    --After I click ‘Mine’

     

    --After I click "Back"

     

    Best regards,
    Lionel Chen

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