How to do it…

  1. Open the Automotive.qvf app provided for Chapter 2, Visualizations.
  2. Go to Sales overview.
  3. Click on the Edit sheet icon to enter edit mode.
  4. Right-click on Line chart and select Add to master items.
  5. Keep the name of the master item the same as the object, and click on Add.
  6. Repeat steps 4 and 5 for the next six objects of the sheet.
  1. Go to Production overview.
  2. Right-click on Line chart and select Add to master items.
  3. Keep the name of the master item the same as the object, and click on Add.
  4. Repeat steps 4 and 5 for the next six objects of the sheet.
  1. In the end, you will have 14 objects added to the visualization section on Master items:
  1. Create a new sheet and label it as Sales and Production Overview:
  2. Create a new variable using the variable editor.
  3. Give the Name as view_selector, and in Definition, write Sales.
  1. Click on the pencil icon to save the variable definition:
  1. Click on Close to go back to the content area.
  2. First, we need to set up an object to switch the visualization between sales and production, so add the variable extension in the top of the content area.
  3. In Variable properties, set the name as view_selector.
  4. Switch the Show as property to Buttons.
  5. Add two new alternatives with the following parameters:
    1. Alternative 1: Value = Sales, Label = Sales
    2. Alternative 2: Value = Production, Label = Production
  1. The variable object will look like the following screenshot:

  1. Add the ShowHide Container object to the content area and align the object just under the variable object. The idea is to reproduce the same layout used on the Sales Overview sheet, so try to keep the following objects in the same position as in the original sheet.
  2. In the property panel of the first ShowHide Container, set the Master Object as Vehicle sales by year.
  3. Click on Add Conditional Visualization, and select Vehicle production by year in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0) 
  1. Add the second ShowHide Container object to the content area at the bottom left.
  2. In the property panel of the first ShowHide Container, set the Master Object as Vehicle sales by region.
  3. Click on Add Conditional Visualization and select Vehicle production by region in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0) 
  1. Add the third ShowHide Container object to the content area.
  2. In the property panel of the first ShowHide Container, set the Master Object as Car sales by territory.
  3. Click on Add Conditional Visualization, and select Car production by country in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0) 
  1. Add the fourth ShowHide Container object to the content area.
  2. In the property panel of the first ShowHide Container, set the Master Object as Commercial vehicle sales by territory.
  3. Click on Add Conditional Visualization, and select Commercial vehicle production by country in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0) 
  1. Add the fifth ShowHide Container object to the content area.
  2. In the property panel of the first ShowHide Container, set the Master Object as Car sales by region.
  3. Click on Add Conditional Visualization and select Car production by region in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0) 
  1. Add the sixth ShowHide Container object to the content area.
  2. In the property panel of the first show hide container, set the Master Object as Car % all vehicle sales.
  3. Click on Add Conditional Visualization, and select Car % all vehicle production in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0)

  1. Add the seventh ShowHide Container object to the content area.
  2. In the property panel of the first ShowHide Container, set the Master Object as Commercial vehicle sales by region.
  3. Click on Add Conditional Visualization, and select Commercial vehicle production by region in the Master Object list.
  4. Set the expression for Show Condition for Chart to the following:
=if(view_selector = 'Production',1,0)
  1. The resulting sheet will look like the following screenshot:
  1. Click on the Production button to switch all objects from the Sales to the Production view:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset