Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jorditorras
Creator
Creator

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
sunny_talwar

Looking to do this in script or front end?

Ricardo_Gerhard
Employee
Employee

Dear Jordi,

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

Above - chart function ‒ Qlik Sense

Previous - script function ‒ Qlik Sense

Ricardo Gerhard
OEM Solution Architect
LATAM
jorditorras
Creator
Creator
Author

Both possibilities would be fine.

Thanks,

Jordi

sunny_talwar

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

jorditorras
Creator
Creator
Author

For a KPI object.