Forum Discussion
Yash_
4 years agoRegular Visitor
Power BI Slicer default value as per UserPrincipalName
I'm trying to create a slicer which will contain the names of the users. The table which contains usernames also have a column email_id, which will contain userprincipalname of the user. How can I create a condition so that by default the user should see their own data, and they should be able to see other user's data if they want?
- Anonymous4 years ago
Hi Yash_ ,
Create a measure like below:
Measure = IF(SELECTEDVALUE('Table'[email_id])=USERPRINCIPALNAME(),1,0)Then add this measure to visual filter and set value = 1.After that the visual will only show the data that matched the user and users could see all data if they clear the filter.Best Regards,Jay
3 Replies
- AnonymousNot applicable
Hi Yash_ ,
Create a measure like below:
Measure = IF(SELECTEDVALUE('Table'[email_id])=USERPRINCIPALNAME(),1,0)Then add this measure to visual filter and set value = 1.After that the visual will only show the data that matched the user and users could see all data if they clear the filter.Best Regards,Jay- Nivedhana
Helper I
Very helpful! Is there a way we can select this slicer value by default?
- amitchandak
Super User
Yash_ , for that you need a column, but you can use UserPrincipalName in a measure only. So I doubt some option for that