Forum Discussion
Conditionally Filter Specific Visuals Based on Current User Logged In
- 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
Anonymous
Thanks for your recommended solution.
1) Unfortunately, using the CSRID instead of CSR Name within the CSR Summary table would not be acceptable to the business.
- ID's are not helpful to business users and they do not wish to see them in any visual.
- It is critical that the CSR Name is shown in both the slicer & table visuals.
- Do you know if this is possible?
Aside from this significant problem, the results of [email protected] look good!
2) Unfortunately, when switching to [email protected] (Managing CSR), there is a different problem.
The requirement is that for Managing CSR's, no filtering should take place at all.
However, for csr5, the CSR slicer has been filtered to remove all CSR values.
This would prevent the user (a managing CSR) from using the slicer to select any desired combination of CSR's.
(This is one of the primary goals of the report for managers.)
This is also a significant problem.
Thank you for your time & attempt to help.
Let me know if you have any additional suggestions.
Regards,
Nathan