DO NOT COPY
Practice 2: IF Functions using Shape
14. Highlight Data with Reference Lines
Using Reference Lines
Reference lines mark specific values or regions on an axis based on constant or computed values. You can set the reference line scope to Entire Table, Per Pane, or Per Cell.
Add a Reference Line:
1. Right-click on the axis to be used for the reference line, and choose Add Reference Line → choose Line.
2. Under Scope, specify Entire Table, Per Pane, or Per Cell.
3. Under Line, set the Value compulation to mark on the axis. You can select from the following options:
Option Description
Average Places a line at the average value along the axis.
Constant Places a line at the specified value along the axis.
Maximum Places a line at the maximum value.
Median Places a line at the median value.
Minimum Places a line at the minimum value.
Sum Places a line at the SUM of all the values in either the cell, pane, or entire view.
Total Places a line at the aggregate of all the values in either the cell, pane, or entire view.
CONFIDENTIAL DO NOT COPY
CYBERTREND DATA ACADEMY
4. Select how you want to label the line:
Option Description
None Does not include a label for the reference line.
Value Includes a label that corresponds to value on the axis.
Compulation Displays an automatic label based on the compulation and the measure selected.
Custom Adds a custom label to the text box (Use the menu to the right of the text box to insert values such as the compulation or the value).
5. Format the line using this options shown on the dialog box, and click OK.
Reference Bands
Reference bands show data that falls within a certain window value, and display as shaded areas between two constant or computed values. You can use the computed values used for reference lines.
Most of the functions are calculated after data is returned.
Add Reference Bands:
1. Right-click on the axis to be used for the reference line, and choose Add Reference Line → choose Band.
2. Under Scope, specify Entire Table, Per Pane, or Per Cell.
3. Under Band From, set the Value computation to mark on the axis. You can select from the following options:
Option Description
Average Places a band at the average value along the axis.
Constant Places a band at the specified value along the axis.
Maximum Places a band at the maximum value.
Median Places a band at the median value.
Minimum Places a band at the minimum value.
CONFIDENTIAL DO NOT COPY
CYBERTREND DATA ACADEMY
Option Description
Total Places a band at the aggregate of all the values in either the cell, pane, or entire view. This option is particularly useful when computing a weighted average rather than an average of averages. It is also useful when working with a calculation that uses a custom aggregation. the total is computed using the underlying data and behaves the same as selecting one of the totals options on the Analysis menu. if "Total All Using" has been assigned, the function applied matches the one that has been selected.
4. Under Band To, set the Value computation to mark the other end of the band.
5. Select how you want to label the line:
Option Description
None Select this option to not include a label for the reference line.
Value Select this option to include a label that is the corresponding value on the axis.
Computation Select this option to display an automatic label. The label is based on the computation and the measure that is selected.
Custom Use to type a custom label into the text box. You can use the menu to the right of the text box to insert values such as the computation or the value.
6. Formatting is available for the band, and for the lines that mark either ends of the band.
CONFIDENTIAL DO NOT COPY
CYBERTREND DATA ACADEMY
Practice: Reference Lines
Open Reference_Line_Starter.twbx and create a view according to the following specification:
View One:
You have a bar chart that shows sales by date. Add a constant reference line that shows the sales quota so you can easily see where sales have been slow.
Direction:
1. From Dimension, drag and drop Order Date to Columns.
2. From Measure, drag and drop Sales to Rows.
3. Change Mark Type to Bar.
4. At the Analytics pane, drag Reference Line and choose Table.
• Reference: Line
• Scope: Entire Table
• Line Value: Constant, put the value 7500000
• Label: Custom and fill the text box with “Quota is 7500000”
• Formatting: Line > Red color
CONFIDENTIAL DO NOT COPY
CYBERTREND DATA ACADEMY
View Two:
Starting with a duplicate of the first worksheet, delete the quota reference line. Change the view to show sales for each region broken down by year. Then, add a new reference line so you can compare the average sales.
Directions:
1. From Dimension, drag and drop Order Date to Columns.
2. From Dimension, drag and drop Region to Rows.
3. From Measure, drag and drop Sales to Columns.
4. Change Mark Type to Bar.
5. At the Analytics pane, drag Reference Line and choose Pane.
• Reference: Line
• Scope: Pane
• Line Value: SUM(Sales) > Average
• Label: Value
• Formatting: Line > Red color