Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
I have attached a sample qlikview work file.
I have pulled the data and used that in a straight table. The straight table contain the following items.
Dimension
Date, Center and Shift
Expression
Start - min(PGAuditDateTime)
End - max(PGAuditDateTime)
Length - (Interval(Max(PGAuditDateTime)-Min(PGAuditDateTime),'h:m')) - i have used sum of rows in expression
Graded Qty= sum(GradedQty)
Graded / Hour = (sum(GradedQty)/(interval(time(End, 'hh:mm') - time(Start, 'hh:mm'), 'hh:mm')*24))
but the Graded / hour partial sum shows a different value...
in this example the hours is 372.04 thats correct (i have used sum of rows in expression in expression tab) and graded qty is 197539 thats also correct, but the Graded / Hour= 182.45 which is wrong, it should be of 531.
Anybody please have a look on that and let me know. its a bit of urgent
Appreciate your time and help
Thanks
Ranjith Kumaran
Try:
if(Dimensionality()=0,
sum(GradedQty)/sum(aggr(interval(max(PGAuditDateTime)-min(PGAuditDateTime)),ProcessCenter,PcShift,Date))/24,
sum(GradedQty)/interval(max(PGAuditDateTime) - min(PGAuditDateTime))/24
)
Try:
if(Dimensionality()=0,
sum(GradedQty)/sum(aggr(interval(max(PGAuditDateTime)-min(PGAuditDateTime)),ProcessCenter,PcShift,Date))/24,
sum(GradedQty)/interval(max(PGAuditDateTime) - min(PGAuditDateTime))/24
)
You are getting 182 because Total calculation based on your expression is like this
197539 / Max(Dt) - Min(Dt)
=197539 / 9/9/2014 2:58:27AM - 7/26/2014 12:15:33 AM
=197539 / 1082 : 42
=182.45
1082 : 42 -- You can see this value in your pivot table
It works perfect!!! thanks