Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jorditorras
New Contributor III

KPI Calculation

Dear Gurús,

I have a table as follows:

Date_TimeRolling Time
22/11/2017 11:55:1525
22/11/2017 11:56:2330
22/11/2017 11:57:1640
22/11/2017 11:58:3110
22/11/2017 11:59:2615

And I have to make a calculation as follows:

( (Date_Time) - (Previous Date_Time) ) * Rolling Time

I've found a way for this calculation but in some cases some record is not picking the correct Previuos Date_Time.

Can anyone suggest a way for this calculation? This can be done in the script or in QlikSense Application.

Thanks in advance!!

Regards,

Jordi

5 Replies
MVP
MVP

Re: KPI Calculation

Looking to do this in script or front end?

dcj
Valued Contributor II

Re: KPI Calculation

Dear Jordi,

   You can use the function Above on chart options and Previous (script)

Above - chart function ‒ Qlik Sense

Previous - script function ‒ Qlik Sense

jorditorras
New Contributor III

Re: KPI Calculation

Both possibilities would be fine.

Thanks,

Jordi

MVP
MVP

Re: KPI Calculation

The final output is needed in a chart or a KPI object?

jorditorras
New Contributor III

Re: KPI Calculation

For a KPI object.