Tip of the Week - How Zoho Analytics' variables can be a constant handy Filter?

Tip of the Week - How Zoho Analytics' variables can be a constant handy Filter?

Want to share only selected/partial data from your chart to a particular group/users? For e.g., say you want to share a chart containing complete details of the company to the employees with access only to their department data, or say you want to share a sales chart across regions to the sales people with data restriction to their region only.

In this case, you can create dynamic values called variables to map a criteria with a user, or a group of users in Zoho Analytics. You can use these variables in your user filters as default values to be displayed, or use them as a data filter (filter criteria) while sharing.

In this example, let's use an Actual vs. Achieved Target of sales people chart.



This chart contains the ratio of "set to achieved targets" of sales people in East , West , and Central regions. Now, you want to share this report with your sales team. On one condition - the sales report will show sales persons data depending on regions. To do this, you  can create a variable, and apply this variable as filter criteria while sharing to the users.

How to create variables?

  1. Click the Settings button on the left menubar.
  2. Open the Variables tab.
  3. Click Create New Variable . The Create New Variable dialog opens.

  4. In the  Create New Variable  dialog, enter a  Variable Name  (example,  Sales Region  ). 
  5. In the Map values to users section, enter the Value that needs to be mapped with the Email IDs. Here, the Value is Region - East , West , and Central and the Email IDs are the sales person Email IDs
    • You can directly type the email ids one after the other or add by clicking the Add User/ Group icon.
    • You can add more values by clicking the + Add New Value link.
  6. You can set a Default Value for all the users whose Email IDs are not mapped to a particular value. 
    • You can specify multiple values as default using the + Add New Default Value link. 
    • Selecting the All Values checkbox includes all possible values in your data as the default value.
  7. Click Save once you have set all the options. The variable will be created for this Workspace.

The created variable can be used as a default value in user filters or can be used as a data filter while sharing.

To use the Variable while sharing a View:

Sharing:

In the Apply Permissions & Filters dialog, click the Filters Criteria tab. In the Specify Filter Criteria section, enter the criteria. Here, the criteria will be:
"Target List"."Region"=${Sales Region} 


Embed/Publish URL:

In the Embed/Publish URL dialog, enter the criteria in the Specify URL Criteria section. You can also Mask Criteria in URL to hide it from the link you are sharing.  


Using this criteria in the chart will help you filter the data based on the region and the sales person in the specific region will be able to see data pertaining to their region only. A sample view of the chart with access only to  Central Region  is shown below.  
 

To use the Variable as a User Filter Criteria: 

You can also use the variable as the default display value in user filters. In our case, Region will be the User Filter . Mouse over the User Filter and click the Edit icon. In the Choose Component for User Filter dialog, Specify the default filter value as ${Sales Region} and click OK .


A sample view of the generated chart is shown below.
 

Note : In this case, the sales people will have access to the entire data set. Only the default display will change based on the region. 

Also, please note that only Account, Organization, and Workspace Administrators can set variables for a Workspace.