Forum Discussion
WinterMist
1 year agoImpactful Individual
Conditionally Filter Specific Visuals Based on Current User Logged In
Hello Community - If someone could provide guidance, I would appreciate it. Here is a link to the PBIX: https://drive.google.com/file/d/1IPk0O0nXhVVXXCOU0yLUtRwYL6RGLtyo/view?usp=sharing ...
- 1 year ago
You can't use VALUES on its own, as the CSR table is being filtered by having the CSR name in the slicer or table visual. I think the below works, using REMOVEFILTERS
02 Should Current User Be Filtered = VAR CSRFilterEmailList = //ONLY NON-MANAGER CSR'S SHOULD HAVE DATA FILTERED CALCULATETABLE( VALUES('Dim CSR'[Email]), 'Dim CSR'[IsManager] = 0, REMOVEFILTERS( 'Dim CSR'[Name] ) ) VAR CurrentUser = [01 Current User] VAR ShouldCurrentUserBeFiltered = //VERIFY IF CURRENT USER LOGGED IN IS A NON-MANAGING CSR. //IF YES THEN WE NEED TO FILTER CSR SLICER & CSR TABLE VISUALS BY CURRENT USER LOGGED IN //IF NO THEN DO NOTHING. I.E. DO NOT FILTER THESE VISUALS BY THE CURRENT USER LOGGED IN IF( CONTAINS(CSRFilterEmailList, 'Dim CSR'[Email], CurrentUser), 1, 0 ) RETURN ShouldCurrentUserBeFiltered
speedramps
1 year agoSuper User
WinterMist Did this answer your question? If so please click [accept solution] and thank the helper or give feedback. Thank you.