Expressions will require at least 1 variable, but can have as many as necessary to complete the task at hand. There are two types of expressions: Those derived from the data, or those that can be “manufactured.”
Data Derived Expressions
There are many different kinds of expressions that derive from data. Extracting numbers from existing data can involve date transformations, like adding or removing days from dates in the data, or simply aggregating raw numbers to create a meaningful whole. You can also perform math on your data using expressions, like arithmetic or returning absolute values.
For example, you may have sales from multiple divisions, resulting from different products, regions, etc. What you really want to be looking at is a total sales number, however. Expressions make it easy to aggregate all of the relevant data points to give you the view you want. By taking all of the different groupings, and adding all of the sales together, or summing the data, we can get a total sales for the entire company. The smaller segments of data are still available within the data, of course. If you want to give the end user the option to view these, we recommend letting them drill down into the data for a deep dive.
Let’s say we wanted to aggregate data based on a sales month. In this case, however, all of our transactional data has a specific date and time but the month string isn’t its own data column. We can use a SQL query of datediff(month, dateadd(month, 0, SalesDate), 0) to pull the SalesMonth from the SalesDate. Now we can see monthly trending, where before we would have been inundated with too many dates on a trend line.
SQL Expression Example: Avg Function
SQL Expression Example: getDate()
There is a way to get just about any numbers you are looking for, from the existing data that you have. It may take some doing, but rest assured, using various expressions to transform your data, you can have the numbers you are looking for, to help drive your business.
Get the Guide Psychology of Data Vizualization
Take a primer in cognitive psychology, the science of perception, and neuroaesthetics and learn how to make dashboards even more effective.