Qlik Community

Ask a Question

App Development

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

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Broly
Contributor III
Contributor III

Duration vs Time

Hello all,

can someone tell me how can I solve this issue?

As you can see on screenshot below, I have Arrival field and what I have issue with is the formating.

In the red square it is set to Time,  and you can see that those values are correct, but SUM of those values is not, since it goes over 24 hours. In the green square, arrival field is set to duration, but you can see that values that have 00: in the beginning have their value increased with 24, which is not correct.

So basically I need format which will show correct data like in red square, but SUM should be able to show value like the value in the yellow square.

 

qlik.pngqlik2.png

Labels (4)
2 Solutions

Accepted Solutions
Usama
Creator
Creator

Hi, 

Can you try this expression with Numeric format and then after that convert it into date format 

From Nothing - To Something - To Everything

View solution in original post

Broly
Contributor III
Contributor III
Author

Hi all,

It appears that duration is correct.

I checked the data source and it is like it is shown in charts.

Sorry for the trouble, and thank you for answers.

View solution in original post

8 Replies
Kushal_Chawda

you need to divide the value by 24 hour. try below

Sum(Duration)/24

Broly
Contributor III
Contributor III
Author

Hi,

I only get value divided by 24, so nothing happens.

Kushal_Chawda

what is the expression you are using?

 

Broly
Contributor III
Contributor III
Author


Sum({$<AT_1_TIME_DIFF_CAT={">$(=0)"}>}AT_1_TIME_DIFF )
+
Sum({$<AT_2_TIME_DIFF_CAT={">$(=0)"}>}AT_2_TIME_DIFF )

Kushal_Chawda

are the fields AT_1_TIME_DIFF & AT_2_TIME_DIFF contains hour values?

Broly
Contributor III
Contributor III
Author

Hi, they are in numeric format, and later formated into time. Should I try
something else?
Usama
Creator
Creator

Hi, 

Can you try this expression with Numeric format and then after that convert it into date format 

From Nothing - To Something - To Everything

View solution in original post

Broly
Contributor III
Contributor III
Author

Hi all,

It appears that duration is correct.

I checked the data source and it is like it is shown in charts.

Sorry for the trouble, and thank you for answers.

View solution in original post