Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
| Product | sub | Sales | a | b |
| bav | coffe | 10 | 1 | 4 |
| bav | coffe | 12 | 2 | 4 |
| bav | coffe | 15 | 3 | 4 |
| bav | coffe | 13 | 4 | 4 |
| bav | coffe | 12 | 5 | 4 |
| bav | coffe | 12 | 6 | 4 |
| bav | coffe | 1 | 7 | 4 |
1. Don't want to use aggr().
2. when a<=b-- calculate-- Sum(Sales).
output should be ---
--bav Coffe 50 (10+12+15+13)
What are your chart dimensions?
May be create a uniquely identifiable key in the script like this:
LOAD Product,
sub.
Sales,
a,
b,
AutoNumber(Product&'|'&sub&'|'&a&'|'&b) as Key
FROM Source
And then may be like this:
Sum({<Key = {"=a <= b"}>} Sales)
Note: This uniquely identifiable key will only work, if you have a truely unique key, else you might not see the right results.