Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
its_rajvir
Creator
Creator

Running Total

Dear Experts,

Example data :

Business Date Date Hours Sales 
1/12/2022 1/12/2022 4 23
1/12/2022 1/12/2022 5 45
1/12/2022 1/12/2022 6 67
1/12/2022 1/12/2022 7 86

 

I want to calculate running total by every hour and business date. 

Output Required: Business date will remains same after 12 AM but date will Change. Business day is from 4 AM to next day 4 AM.

Business Date Date Hours Sales  Running Total
1/12/2022 1/12/2022 4 23 23
1/12/2022 1/12/2022 5 45 68
1/12/2022 1/12/2022 6 67 135
1/12/2022 1/12/2022 7 86 221
1/12/2022 1/12/2022 8 34 255
1/12/2022 1/12/2022 9 45 300
1/12/2022 1/12/2022 10 54 354
1/12/2022 1/12/2022 11 23 377
1/12/2022 1/12/2022 12 46 423
1/12/2022 1/12/2022 13 76 499
1/12/2022 1/12/2022 14 45 544
1/12/2022 1/12/2022 15 32 576
1/12/2022 1/12/2022 16 45 621
1/12/2022 1/12/2022 17 67 688
1/12/2022 1/12/2022 18 86 774
1/12/2022 1/12/2022 19 43 817
1/12/2022 1/12/2022 20 23 840
1/12/2022 1/12/2022 21 11 851
1/12/2022 1/12/2022 22 34 885
1/12/2022 1/12/2022 23 98 983
1/12/2022 2/12/2022 0 34 1017
1/12/2022 2/12/2022 1 22 1039
1/12/2022 2/12/2022 2 26 1065
1/12/2022 2/12/2022 3 67 1132
1/12/2022 2/12/2022 4 0 1132
2/12/2022 2/12/2022 5 66 66
2/12/2022 2/12/2022 6 67 133
2/12/2022 2/12/2022 7 45 178
2/12/2022 2/12/2022 8 32 210
2/12/2022 2/12/2022 9 33 243
2/12/2022 2/12/2022 10 45 288
2/12/2022 2/12/2022 11 98 386
2/12/2022 2/12/2022 12 78 464
2/12/2022 2/12/2022 13 77 541
2/12/2022 2/12/2022 14 123 664
2/12/2022 2/12/2022 15 115 779
2/12/2022 2/12/2022 16 135 914
2/12/2022 2/12/2022 17 67 981
2/12/2022 2/12/2022 18 56 1037
2/12/2022 2/12/2022 19 33 1070
2/12/2022 2/12/2022 20 45 1115
2/12/2022 2/12/2022 21 67 1182
2/12/2022 2/12/2022 22 55 1237
2/12/2022 2/12/2022 23 34 1271
2/12/2022 3/12/2022 0 71 1342
2/12/2022 3/12/2022 1 57 1399
2/12/2022 3/12/2022 2 14 1413
2/12/2022 3/12/2022 3 11 1424
2/12/2022 3/12/2022 4 5 1429
Labels (6)
1 Reply
Rockstar7
Partner - Creator
Partner - Creator

use below expression to get the running total

Aggr(RangeSum(Above(Total  ( Sum([Sales ]) ) , 0, 24)),[Business Date],Hours,Date )