Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

KPI

Hello Guys,

I would like to measure a KPI of that month comparing of the KPI of the last month.

example :

KPI : december 2016  VS KPI december 2015

to make my request more clear :

My date field has this format yyyymm example 201603 (is named period)

My calendar dimension is like that :

Capture.PNG

the link between my two tables calendar and the other is % period ID

this is how the period id is measured period_id&'' as [%PERIOD ID]

My final result would be like that :

KPI

2015october

2016october

Recharged

56889606,1

57464978,7

Any idea how to do it??

Thanks a lot

Ce message a été modifié par : master student

8 Replies
Gysbert_Wassenaar

Subtract one value from the other to see the difference between the two. If you need more help, provide more information. Perhaps you can find an answer to your question in one the discussions this search returns: https://community.qlik.com/search.jspa?q=same+month+last+year+comparison


talk is cheap, supply exceeds demand
Not applicable

I suggest you to create a text area with the following code :

=Month(Today())&' '&Year(Today())&' : '&

sum(

     if(month(KPI_DATE)=month(Today()) and year(KPI_DATE)=year(Today()),

     KPI))

&' VS '&Month(Today())&' '&(Year(Today())-1)&' : '&

sum(

     if(month(KPI_DATE)=month(Today()) and year(KPI_DATE)=(year(Today())-1),

     KPI))

master_student
Creator III
Creator III
Author

Thanks Gysbert. more details are mentionned in my first request.

Anonymous
Not applicable

Hi ,

You can set two variables for current month year and last month year and use the same in the two expressions.  Or if the calendar is created correct you can just create a pivot table and get the desired results.

master_student
Creator III
Creator III
Author

how please

Gysbert_Wassenaar

My date field has this format yyyymm example 201603 (is named period)

If it's really a date field and there is only one value for each month like the first date of the month then you should be able to use expressions like:

Selected period: sum({<period={"=$(=Date(Max(period),'YYYYMM'))"}>} Amount )

Same period previous year: sum({<period={"=$(=Date(AddYears(Max(period),-1),'YYYYMM'))"}>} Amount )


talk is cheap, supply exceeds demand
master_student
Creator III
Creator III
Author

Thanks

How to change the name of columus of my KPI's dynamically please,

Gysbert_Wassenaar

Use an expression as label for the expression column


talk is cheap, supply exceeds demand