The only other option I can currently think of would be to publish the workbook with the filter set to a department that all viewers are allowed to see.
Thanks for your answer, this is not an option, because each viewer has his own departmert. Therefore there is no departmert that all viewers are allowed to see.
What I need is a default value of a filter, which I can set dynamically. We do this in Report Server.
I believe the best way to accomplish this, with trusted tickets, is to use a url parameter, that maps a user to a certain field.
I am attaching a sample python script (2.7).
The comments should explain what each step is doing fairly clearly, but let me know if I missed something.
Keep in mind this is NOT vetted for production, it is just an example of a way the filter could be applied.
TicketWithURLFilter.py.zip 812 bytes
You have to use a Calculated Field that compares the Department to the User permission and returns TRUE or FALSE
Then use this on the filters shelf and filter to TRUE. This is going to show only the departments where there is a match.