

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rangesum(Before( is not working right
Hi esperts,
In my data model I have only one table with simple fields (dimensions and values).
I need to make a progressive sum in a week of production for a quantity field ([Qt Movimento Coeff.]).
But the result of the sum seems bad.
It adds one value for each day:
26891+35785=62676 (qlik shows 62677) +22205= 84881 (qlik shows 84883)
The First Formula (Parziale) = SUM([Qt Movimento Coeff.])
The Second One (Progressivo) = rangesum(before(sum([Qt Movimento Coeff.]), 0, 7),MGiornoN)
MGiornoN is a parallel dimension of >MGiorno
0=Lun 1=Mar, 2=Mer, 3=Gio, 4=Ven, 5=Sab, 6=Dom
What am I doing wrong?
Thanks
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I think the reason of result+1 issue is this part of your expression:
rangesum(before(sum([Qt Movimento Coeff.]), 0, 7),MGiornoN)
Because RangeSum(Value1, Value2, Value3 etc.) function means the sum of all values separated by the comma.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I think the reason of result+1 issue is this part of your expression:
rangesum(before(sum([Qt Movimento Coeff.]), 0, 7),MGiornoN)
Because RangeSum(Value1, Value2, Value3 etc.) function means the sum of all values separated by the comma.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ahah, ok now it works!
I thought that the second part of the rangesum formula was to select which one field you consider for the interval 0,7.
But now I don't know why i must write the interval 0,7 if the interval is ever 0,6. (from Mon to Sun)
It works when i write 0,7 but it doesn't for 1,7 and 0,6. Why?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
0=Lun 1=Mar, 2=Mer, 3=Gio, 4=Ven, 5=Sab, 6=Dom
--> 7 Values
