Enhancing user experience, analysis, and visualizations / Free Night Analysis
Last updated
Last updated
Let’s say we want to give the vacation condo manager the ability to do some what-if analysis. Every year, she offers a free night during the month of December. She wants to be able to see which renters would have received the free night, depending on which night she chooses.
To accomplish this, follow these steps:
If you have not done so, create a Gantt chart similar to what was shown earlier (following the field placement of the screenshot).
Create a parameter called Free Night with a data type of Date and a starting value of 12/12/2020
. This will allow the manager to set and adjust the starting date for the promotional month. Show the parameter control by selecting Show Parameter Control from the drop-down menu on the Free Night parameter in the data pane.
Now, add a reference line to the view to show the free night. Do this by switching to the Analytics tab in the left-hand sidebar. Drag Reference Line to the view and drop it on Table:
Figure 4.18: Add a reference line by switching to the Analytics pane and dragging the reference line onto the canvas
In the resulting dialog box, set Line Value to Free Night. You may wish to set Label to None, or Custom with the text Free Night
. You may also wish to adjust the formatting of the line:
Figure 4.19: Use the Edit Reference Line dialog to adjust the formatting, labels, and tooltips
Create a calculated field called Gets Free Night that returns a true
or false
value, depending on whether the free night falls within the rental period:
Place this new calculated field on the Color shelf.
We now have a view that allows the apartment manager to change the date and see a dynamically changing view that makes it obvious which renters would have fallen within a given promotional period. Experiment by changing the value of the Free Night parameter to see how the view updates:
Figure 4.20: The reference line will move, and the affected individuals will be recalculated every time you change the Free Night parameter value
The preceding view shows the proposed free night as a dashed line and highlights which rental periods would receive a free night. The line and colors will change as the apartment manager adjusts the Free Night parameter value.