Data Studio
3.2K members online now
3.2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

filter data studio dashboard by logged in user

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

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? 

 

Thanks!

filter data studio dashboard by logged in user

[ Edited ]
Follower ✭ ☆ ☆
# 2
Follower ✭ ☆ ☆

Hi Ranjeet

 

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-

 

http://stackoverflow.com/questions/29683423/how-do-i-give-different-users-access-to-different-rows-w...

 

Hope it helps!

 

Thank you.

 

Mahbub

Re: filter data studio dashboard by logged in user

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

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.

filter data studio dashboard by logged in user

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

What I wouldn't give for an answer to this - if you find one please let me know Smiley Happy

filter data studio dashboard by logged in user

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Please up vote the issue I created in the Google Data Studio backlog.

Up voting is currently the best way to get it into the attention of the Data Studio Team.

 

https://issuetracker.google.com/issues/67353646

filter data studio dashboard by logged in user

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

yes but you have to give permession "bigquery viewer" at least to all  your viewer mails so he can query data, otherwise he will have the acces denied from bigquery... and that's not very propriate