Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum by time and date in Script

Hi,

In my script I need to sum transactions executed at the the exact same time and same day.

LOAD
    
Date,
    
Time,
    
SettlementAmount

INPUT Example:

Date                     Time                    SettlementAmount

01/01/2014          08:00:01               100

01/01/2014          08:00:01               100

01/01/2014          08:00:02               200

01/01/2014          08:00:02               200

01/01/2014          08:00:03               300

02/01/2014          08:00:01               100

02/01/2014          08:00:01               100

02/01/2014          08:00:02               200

02/01/2014          08:00:02               200

02/01/2014          08:00:03               300

Expected Output (sum per time and date):

01/01/2014          08:00:01               200

01/01/2014          08:00:02               400

01/01/2014          08:00:03               300

02/01/2014          08:00:01               200

02/01/2014          08:00:02               400

02/01/2014          08:00:03               300

Any ideas?

22 Replies
Not applicable
Author

Hi Johan,

tried both ways, but for some reason the grouping (and or/ Amount_New) gets messed up when adding the final2 load.

This is what happens:

Capture2.JPG.jpg

Should look as per below:

Capture.JPG.jpg


puttemans
Specialist
Specialist

Hello Olle,

I already managed to get a single line per time, with the corresponding total amount. Now the sum of these per line don't seem to work. I've been struggling with it, but cannot find yet the solution to it.

Not applicable
Author

Ok

I appreciate your help John!