Creating a Shaded Line Chart in NetSuite Analytics Workbooks: Year-over-Year Sales Comparison for Reps
===========================================================
In this article, we will explore how to create a shaded line chart in NetSuite Analytics Workbooks that compares the sales of a group of representatives over two consecutive years. This involves using formulas and configuring the series, x-axis, and shading options correctly.
Understanding the Basics of NetSuite Analytics Workbooks
NetSuite Analytics Workbooks is a powerful tool for data analysis and visualization within the NetSuite application. It provides various features, such as charting, filtering, and calculations, to help users gain insights into their business data. In this article, we will focus on creating a shaded line chart that displays year-over-year sales comparisons for representatives.
Setting Up the Criteria Field
To create a shaded line chart, we need to first set up a criteria field that filters our data based on specific conditions. The closest we can get to achieving this is by using a column chart with separate measures for each month. This gives us a year-over-year comparison but not exactly what we are looking for.
However, we can use the formula below as an alternative to achieve similar results:
CASE WHEN TO_CHAR({trandate},'DDD') <= TO_CHAR(CURRENT_DATE,'DDD') AND TO_CHAR({trandate},'YYYY') >= (TO_CHAR(CURRENT_DATE,'YYYY') - 1) THEN 'T' ELSE 'F' END
This formula checks if the date is within the current year and then compares it to the previous year’s dates. If the condition is met, it returns a value of ‘T’; otherwise, it returns a value of ‘F’.
Configuring the Series
Once we have our criteria field set up, we can configure the series for our chart.
- Series Field: This specifies which field in your data you want to use as the series values. In this case, we will use
TO_CHAR({trandate},'YYYY')
, which gives us the year. - X-Axis: The x-axis represents the time series dimension of the data (e.g., month, week, or date). We have three options for the x-axis: Month (
TO_CHAR({trandate},'MM-MON')
), Week (TO_CHAR({trandate},'WW')
), and Date (TO_CHAR({trandate},'MM/DD)
).
Choosing the X-Axis Option
When choosing an option for the x-axis, you need to consider what is most relevant to your analysis. In this case, we are comparing year-over-year sales, so using TO_CHAR({trandate},'YYYY')
as the series field might not be ideal.
Here’s how we can modify our chart to get a shaded line:
Option 1: Shaded Line with Custom Series and X-Axis
Series Field: TO_CHAR(CURRENT_DATE,'YYYY') - TO_CHAR({trandate},'YYYY')
This will give us the year-over-year difference in sales. We can now choose our x-axis option based on what we want to display.
Option 2: Shaded Line with Custom Series and X-Axis
Series Field: TO_CHAR(CURRENT_DATE,'YYYY') - TO_CHAR({trandate},'YYYY')
X-Axis: Month (`TO_CHAR({trandate},'MM-MON')`)
We can now use the shaded line feature to compare our year-over-year sales data.
Displaying Shaded Lines in NetSuite Analytics Workbooks
To display a shaded line in NetSuite Analytics Workbooks, you need to go to the “Design” tab and click on “Shading” under “Advanced Chart Settings”. From there, you can select different shading options such as:
- Solid fill: A solid color that fills the entire area of the chart.
- Gradient fill: A gradient color that transitions from one color to another within the area of the chart.
To apply a shaded line to our data, we need to use the “Fill Between” option in our design settings:
Fill Between: Yes
This will give us a shaded line that connects the series values and displays year-over-year sales comparisons for representatives.
Additional Considerations
Here are some additional considerations to keep in mind when creating a shaded line chart in NetSuite Analytics Workbooks:
- Data filtering: Make sure you have filtered your data correctly based on your criteria field.
- Series and x-axis configuration: Ensure that your series field is correct, and the x-axis option aligns with what we want to display (year-over-year sales or individual month/week/dates).
- Design settings: Adjust your design settings accordingly by using the “Fill Between” option for shaded lines.
By following these steps, you should now have a clear understanding of how to create a shaded line chart in NetSuite Analytics Workbooks that compares year-over-year sales data for representatives.
Last modified on 2024-03-22