I'm looking for a solution for this case:
A user must be able to see anything from any other department, but when the reported opens by default it must only show his own department(s).
It seems to be not possible to just selected 1 value in a slicer (with all the usernames), based on the user(principal)name. So my alternative workaround is to create a slicer called 'Show only my own department'. This one must open with default selection 'Yes' and can only contain 'No' as other value; 1 value must always be selected. For this I use Chicklet Slicer. So far no problems; but now I need to filter a measure based on this slicer.
Current situation:
Report Slicer: Name: 'Show only my department'. Possible values: Yes or No.
Dataset: Name: Table_ProductionNumbers. Columns: User_Email, SoldItems, CustomerID.
Now I want this behaviour:
When 'No' is selected I want to see the total sum of solditems and the distinct count of CustomerID. When 'Yes' is selected I only want to see the sum of solditems that have a value in User_Email that is equal to the value of USERPRINCIPALNAME() and for the distinct count of CustomerID I also want to count the CustomerID's of records where User_Email equals USERPRINCIPALNAME().
(How) Can this be done in DAX? And is there also a possible solution which does not need some DAX for every measure, but does actually 'filter' the dataset in Table_ProductionNumbers? This makes it a lot more easy to add some more measures later on...