Current user variable


Catering dashboards to a specific viewer is possible with the use of the {CURRENT_USER} variable. The {CURRENT_USER} variable stores the email of the current user. Use this value in your charts and dashboards to build dashboards and charts that can filter based on who is currently viewing the dashboard. You can use this variable like any other dashboard variables.


Interactive Mode

When using the {CURRENT_USER} variable to filter, select the column or field you would like to filter and set it equal to a custom value. In the custom value, type in {CURRENT_USER}.

Filter by User Email

SQL Mode

Use the {CURRENT_USER} variable like any other dashboard variable by simply typing in {CURRENT_USER} and using it with any column or field you wish to filter with. You can also select the value by selecting {CURRENT_USER} in the select clause of your query.

`SELECT COUNT(DISTINCT "tablename"."users") AS "Count of users"FROM "public"."tablename" AS "tablename"WHERE (("tablename"."user_email" = {CURRENT_USER})) LIMIT 10000;`


Use the {CURRENT_USER} variable as a global variable to filter your entire dashboard. The variable itself is already available to use so you do not need to create it like any of the other dashboard variables. If you want to display the value of the variable, add a text element and set that text element to equal the value of the current user variable by typing in {CURRENT_USER}.

Add Text on the dashboard and filter as desired

Related Variables Help Articles

See more