Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am facing an issue with sum().
I have minutes calculated as
round(Interval(Date1-Date2,'mm')*(24*60)) as IntervalMinutes
For an data it comes 32 but when i write sum(IntervalMinutes) it shows 64.
Any idea
Can you post sample app
The output of Interval() is a QlikView Timestamp so 32 minutes is stored numerically as 32/60/24 which = 0.022222.... And the Round() function forces it to display as numeric decimal, which will be 0 after the rounding.
The Sum() functions though should leave it displaying in minute format, so this :
=sum ( interval ( timestamp(timestamp#('02-Dec-2014 10:42' , 'DD-MMM-YYYY hh:mm'))
- timestamp(timestamp#('02-Dec-2014 10:10' , 'DD-MMM-YYYY hh:mm')) ,'mm' ) )
displays an output of 32.
Given the above what is it that you wish to achieve with this expression ?
Bill its ok i get 0.0222222 I round up it after multiplying by 24*60 and then i round off. It comes 32 Now when i use expression sum() the minutes i get 64
@Bill Markham
Hi King,
take a close look at your underlying data, bring in a rowno() field, I think you will find you have duplicate rows coming through, when looking at the underlying data you will only see the single row, hence the 32, but actually 2 exist which is being calculated within the sum and giving you the 64
hope that helps
Joe