filter data studio dashboard by logged in user
I need to filter my dashboard based on the logged in user so people can only see data related to entries they created. My plan is to make a calculated field in my data source called "Authorized User" with the following logic:
CASE WHEN Session.getActiveUser)().getEmail() = CoachEmail THEN TRUE ELSE FALSE END
Data Studio does not appear to recognize Session.getActiveUser)().getEmail(), though. Does anyone know how to reference the email address of the current user from a calculated field?
filter data studio dashboard by logged in user[ Edited ]
December 2016 - last edited December 2016
If your underlying data-set is in big query, you can try to create row level permission using a reference table with CURRENT_USER() function to get the email address.
Once you have this, now are are eligible to change the report data-set in data studio from owner credential to viewer credential. And restrict user from viewing unwanted.
Details is given below-
Hope it helps!
Re: filter data studio dashboard by logged in user
Thanks for the reply! My underlying data source is a simple Google Sheet. Data in the sheet is automatically generated by a Google Form, so I have the email address of the person who submitted the record. The only option I see to write code is in the calculated field section, but CURRENT_USER() generates an "Invalid formula" error if I try to use it there.