Creating 1010data macro code for your 1st Basic Metric
This will show you how to create a very simple Metric - a visualization that measures sales over time.
1. Build your macro code
1.1. Formatting date to mm/dd/yyyy
4. Copy Macro Code to paste into Metric Insights.
Metric Insights takes raw macro code from 1010data. Copy the 1010data macro code out of the Edit Actions window to paste into Metric Insights.
To see how to build a Metric from scratch, click the following this link:
5. Paste your code into Metric Insights Metric Editor
Paste the code into the Macro Code box in the Metric Editor.
6. Remove table name note at the beginning of the code, and paste table into table name field.
- Paste the Table Name into the Table Name field & remove table note from code.
- Validate your command to verify code. If your statement is valid, the statement box is green; if there are any errors, the box is colored in red and errors will be explained in the field below.
NOTE: You may replace your date selection in the code with :last_measurement_time. :last_measurement_time bind variable will be substituted at run-time with the last data point collected for the metric.