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: 
Not applicable

Total in script wrong values

Hi , in this script I need to get the total TOTALGIAC

groupped by year and month.

The total by item is correct but the total by year and

month gets some differences.

Please, What is wrong?

QV release 10.

Manu thanks!

//***********************************************************************

tmp:
NoConcatenate
LOAD
posted  , itemNo  ,  qt

RESIDENT RESULT
ORDER BY    itemNo  ,  posted   ;

dataFinal:
NOCONCATENATE load

qt  ,
itemNo  ,
posted  ,

IF (
        (DayNumberOfYear(posted)) < 7
         and week(posted) > 2
        , 1 ,    
         week(date#( posted, 'DD/MM/YYYY')))  as weekly ,
        
month(date#(posted , 'DD/MM/YYYY')) as month,
year(date#(posted , 'DD/MM/YYYY')) as year ,
day( date#(posted , 'DD/MM/YYYY')) as Day ,

IF(
itemNo   = Previous(itemNo),
NumSum(Peek('Gia'), qt )

,qt ) as Gia

resident tmp ;


giac:

NOCONCATENATE
load
monthName(date#(posted , 'DD/MM/YYYY')) as monthYear ,
date#(posted , 'DD/MM/YYYY') as posting ,
month,
year ,
Day ,
weekly ,
itemNo as item ,
qt as QTY,
Gia as Giace
resident dataFinal ;


//*****************************************************

left join load
itemNo  as item ,
monthName(date#(posted , 'DD/MM/YYYY')) as monthYear ,
sum(Gia)  as TOTALGIAC

resident  dataFinal
Group by
monthName(date#(posted , 'DD/MM/YYYY'))   , itemNo   ;

//*****************************************************

left join load

item ,  Family
From.....


Left Join load

Famili, Lines

12 Replies
Not applicable
Author

QV 10 is very dangerous many many files doesn't work.  WE have many problem with this release.

sebastiandperei
Specialist
Specialist

Could you send the qvw?

I never had problems with QV10... What kind of problems do you have?

Not applicable
Author

No I can't.. .  The data are not of mine. I posted the code. above