Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculations in a Text and Image Chart

When I use :

count({<STATUS={'CHK'}>}encID) / interval(sum({<STATUS={'CHK'}>}Minutes), 'h')

I get '40.51', when the correct result should be '1.69'.

If I do:

count({<STATUS={'CHK'}>}encID) &'/'& interval(sum({<STATUS={'CHK'}>}Minutes), 'h')


I get: '464/274' - which is the correct values.


How do I correct my code to get the desired '1.69'?

2 Replies
Lisa_P
Employee
Employee

I think it's due to the formatting of the hours.

What happens if you divide by 60 instead of the interval ?

Anonymous
Not applicable
Author

I changed function to:

count({<STATUS={'CHK'}>}encounterID) / (sum({<STATUS={'CHK'}>}interval(endTime - startTime, 'hh:mm')*60*24)/60)

which solved my problem.