Effectively using the KPI object in Qlik Sense®

A visualization should provide the user with a careful and effective presentation of the data. Numbers have an impact value and they contain a message. Key performance indicators demonstrate the importance of numbers in business and also communicate the health of the business to the audience.

Getting ready

We will make use of the application from the preceding recipe. The application has the following script loaded, it gives information on the Sales and Target values for four countries:

LOAD * INLINE [
Country, Sales, Target
USA, 10000, 8500
UK, 7000, 9500
Germany, 5000, 4500
Japan, 6000, 6000
];

How to do it…

  1. Go to the App overview and create a new sheet.
  2. Name the sheet as KPI and open it.
  3. Go to the Edit mode by clicking on How to do it….
  4. Drag across the How to do it… object from the Assets panel on to the sheet.
  5. Next, add the following measure:
    (Sum(Sales)-Sum(Target))/Sum(Target)
  6. Name the label as Sales vs Target.
  7. Once we add the measure, we can see a host of properties, such as number format, color, and so on, for the measure directly beneath the Expression editor box.
  8. For the measure, change the number formatting to Number and select the percentage format (12.3%) from the available formats under the dropdown.
  9. Next, add the limits to define colors. Switch on Conditional colors.
  10. Click on Add limit and set the limit under function as 0.
  11. Click on the first segment of the color bar and select the color as red with a How to do it… symbol .Click on the second segment of the color bar and select the color as green with a How to do it… symbol.
  12. The KPI object appears as the following:
    How to do it…
  13. Under Appearance, click on General and Switch on Show titles and name the title as Sales vs Target.
  14. Name the subtitle as:
    IF(getselectedcount(Country)>0,Country,' ')
  15. Next, go to the Presentation dropdown and uncheck Show Title.
  16. Add the Filter pane object from the Assets panel on the sheet and select the dimension as Country. Select different countries to see how your organization is faring with respect to each country:
    How to do it…
  17. Next, we will link our KPI object to a sheet that shows detailed reports.
  18. Create a new sheet called Reports.
  19. Create a Table report on the reports sheet with Country as the dimension and the following measures:
    • Sum(Sales): Label it Sales.
    • Sum(Target): Label it Target.
    • (Sum(Sales)-Sum(Target))/Sum(Target): Label it Sales vs Target. For the measure, change the number formatting to number and select the percentage format (12.3%) from the available formats under dropdown.
  20. Move back to the KPI sheet and enter the Edit mode by clicking on How to do it…. Select the KPI object. This will activate the Properties panel on the right.
  21. Under Appearance, go to Presentation and switch on Link to Sheet. Under Select a sheet, select the Reports sheet and click on How to do it….
  22. When we click on the KPI object on the user interface, it directs us to the reports sheet where you can analyze all the sales and target figures for each country:
    How to do it…

How it works…

The KPI object is an important visualization object on any dashboard. The color segments we defined in the properties determine if the country is doing better than its set target value or not. If the sales are below the target values then the KPI figure is shown in red or else in green. Linking the KPI to the Reports sheets helps the user to dig deep into the data and see the more granular figures.

There's more…

The KPI object can also be represented using two measures. We can show a comparison between key figures in a single KPI object. For example, the absolute sales and target values can be shown adjacent to each other as separate figures. If the sales are greater than the target then the value is represented in a green color or else in a red color.

This can be achieved by following the steps mentioned in the following steps:

  1. Create a new KPI object by following the steps given in the previous recipe. Label the object as Sales vs Target-1.
  2. Add the following measures:
    • Sum(Sales): Label it Sales
    • Sum(Target): Label it Target
  3. For Sales switch on the conditional colors.
  4. Click on Add limit.
  5. Set the limit under function as:
    =Sum(Target)
  6. Select the first color as red with a There's more… symbol and the second as green with a There's more… symbol.
  7. For Target, select the font color as Blue
  8. The resultant object will be similar to the following:
    There's more…

See also

  • Creating text and images
..................Content has been hidden....................

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