Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Comparing indicators with Multi KPI

Ezir
Contributor II

Comparing indicators with Multi KPI

Comparing indicators with Multi KPI

 

Goal: compare current year with previous year sales in same KPI. See image below.000.png

In load editor add script:

sales:
load * inline [
year, sale,
2017, 50198,
2018, 61532,
2019, 63182
];

 

1) Add Multi KPI object (extension Qlik Sense)

001.png

 

2) Add a dimension

=ValueList('Current year', 'All')

002.png

3) Add variables

003.png004.png

4) Configure KPI appearance

005.png

Properties Appearance > Dimensions

  • Hide labels: true
  • Center aligned labels: true
  • Hide external borders: true
  • Hide internal borders: true

5)  Add a measure Current Year Sales

006.png

Properties:

  • Expression:  =sum({<year={"$(vCurrentYear)"}>} sale)
  • Label: ='Sales $(vCurrentYear)'
  • Number formatting: Money
  • Group by dimension: true
    • Dimension Value: Current year

 

007.png

  • Icon: ='lui-icon lui-icon--line-chart'
  • Icon size: Large

 

6) Add a measure Previous Year Sales

Properties:

  • Expression: =sum({<year={"$(vPreviousYear)"}>} sale)
  • Label: ='from $(vPreviousYear)'
  • Number formatting: Money
  • Label color: #7b7a78
  • Value color: #7b7a78
  • Group by dimension: true
    • Dimension Value: Current year
  • Override parameters: true
    • Size: Tiny
    • Labels order: Value, Label

008.png

7) Add a measure Current Year vs Previous Year Percentage

Properties:

  • Expression: =(sum({<year={"$(vCurrentYear)"}>}sale)/sum({<year={"$(vPreviousYear)"}>}sale))-1
  • Number formatting: Number (12,34%)
  • Label color: #7b7a78
  • Value color: #7b7a78
  • Hide label: true
  • Group by dimension: true
    • Dimension Value: Current year
  • Override parameters: true
    • Size: Mini
  • Icon: =if((Sum({<year={"$(vCurrentYear)"}>}sale)/Sum({<year={"$(vPreviousYear)"}>}sale))-1>0,'lui-icon lui-icon--triangle-top','lui-icon lui-icon--triangle-bottom')
  • Icon position: Value
  • Icon order: Value, Icon

009.png

 

8 ) Add a measure All sales

Properties:

  • Expression: =sum(sale)
  • Label: All
  • Number formatting: Money
  • Group by dimension: true
    • Dimension Value: All
  • Icon: ='lui-icon lui-icon--sheet'
  • Icon size: Large

9) Add a measure Annual average

Properties:

  • Expression: =sum(sale)/count(distinct year)
  • Label: annual average
  • Number formatting: Money
  • Label color: #7b7a78
  • Value color: #7b7a78
  • Group by dimension: true
    • Dimension Value: All
  • Override parameters: true
    • Size: Tiny
    • Labels order: Value, Label

 

Done!

 

Best regards,

 

Ezir

Comments
harika18
New Contributor III

Hello,

When we add year as a filter and selecting the values are not reflecting.What to do?

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2019-08-15 11:40 AM
Updated by:
 
Contributors