Ubiq allows you to create custom formula/ variables and use them in your charts using drag & drop, directly in your SQL queries or as global dashboard filters.
To create a formula or variable, click Formula/ Custom Variable Tab on project page
Click Add Formula/ Custom Variable button
You'll see a form where can fill in details about the formula, such as name of the formula variable, data type of formula (whether is a text,number or date), table used for calculating the formula and finally the actual formula. Click Save to save the formula
You'll see the formula variable listed in the Formula/ Custom Variable Tab. To add it in a chart, click on Create Chart button in charts tab.
You'll see the formula variable listed on the left side of the page. You can drag & drop this variable in one on of the boxes such as X-axis, Y-axis, Static Filters or Dynamic Filters. You will also be able to apply various functions based on the data type of formula variable
To use a formula variable in your SQL, you can use it within curly braces {} without any spaces in between, as shown
After you have created formula variable as described above, click 'Add Global Filters' for the dashboard where need to use the formula.
You'll see the formula variable listed on the left side of the page. You can drag & drop this variable in the box for global dashboard filters and click save. You'll see the formula appear as dashboard filters on your dashboard. You will also be able to apply various functions based on the data type of formula variable.