Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Rounding durations

Hi,

I have an expression for rounding durations, with a variable for the rounding step:

Interval(Round(ParkingDuration,(1/$(vDurationFrac))),'hh:mm'))

vDurationFrac can be 24,48,96  (for 15,30,60 minutes).

When selecting fractions of 30 minutes, it's not clear how the rounding is done.

For example, duration range from 1:45 to 2:14 hours are rounded to 2:00 hours.

There are values 1:44 or 2:15 which are not taken into account.

Can someone clarify please?

Thanks!

2 Replies
dafnis14
Specialist
Specialist
Author

I guess I figured it ..

according to Round Help:

"... If x is exactly in the middle of an interval, it is rounded upwards..."

vinieme12
Champion III
Champion III

please post some sample data with expected output

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.