3 Replies Latest reply: Jun 12, 2018 7:10 AM by bruno bertels

# KPI

If I have revenue in one of my KPI's, how do I add a little indicator of its revenue vs last year? For example, lets say revenue was \$100 this year and last year was \$50, so my KPI for this year would have a little green arrow with the percentage of how much it went up (200%) according to the previous year. Please let me know if this is possible.

Thank You!

• ###### Re: KPI

Hi

In Qlik Sense you can use a KPI Object

maybe something like this to get the max year available

Sum({\$<Date={\$(=max(year(Date)))}>}revenue)

To get the % versus last year

add a second mesure like this

Sum({\$<Date={\$(=max(year(Date)))}>}revenue) / Sum({\$<Date={\$(=max(year(Date)-1))}>}revenue)

select format as personalized

model format :

add this format : ▲  ###0,0%;▼  ###0,0%

color by expression :

if(

Sum({\$<Date={\$(=max(year(Date)))}>}revenue) / Sum({\$<Date={\$(=max(year(Date)-1))}>}revenue)>0,rgb(0, 255, 110),rgb(255, 0, 34))

hope it helps

Bruno

• ###### Re: KPI

Hi Bruno,

Can you help me with the 'versus last years revenue' percentage formula? My year is 'Fiscal Year' and Revenue is 'Revenue'

Thanks,

Shanace

• ###### Re: KPI

may be this :

Sum({\$<Date={\$(=max(year([Fiscal Year])))}>}Revenue) / Sum({\$<Date={\$(=max(year([Fiscal Year])-1))}>}Revenue)

color :

if(

Sum({\$<Date={\$(=max(year([Fiscal Year])))}>}Revenue) / Sum({\$<Date={\$(=max(year([Fiscal Year])-1))}>}Revenue)>0,rgb(0, 255, 110),rgb(255, 0, 34))