Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in above() function to calculate aggregate sum for previous day

Currently I have a Straight Table that outputs 2 columns  Date and Sum_visitor using the following:

1. Dimension = date

2. Expression (Sum_visitor)  = aggr(sum(count_visitor), date)

I also created anothe expression (Sum_visitor_prev_day) to do the same aggregate for number of visitors from the previous date with this expression:

3. Expression (Sum_visitor_prev_day) = aggr(rangesum(above(sum(count_visitor),1,1)), date)

Also, I did 3 loads to get the data

a. First load: May 1

b. Second load: May 2

c. Third load: May 3-May 5

I used incremental qvd to do this and concatenate everything in a cumulative QVD and load cumulative QVD into the main QVW to get the data below.

I kept getting weird values for the 1st and 2nd rows in red below - the correct values that i want are in brackets. Please help!

Thanks,

Erin

DateSum_visitorSum_visitor_prev_day
May 12025 (0)
May 2230 (20)
May 31723
May 41917
May 52519
1 Reply
Not applicable
Author

Ok I marked this as "assumed answer" by accident. Could someone show me how to undo that please?

Thanks,

Erin