Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
seems, that I have a quite common case here, but I have not found a solution here yet:
I have a table of sales per year and month
I'm looking for a solution to count the numbers in last column of below table
This column should summarize the monthly sales of the current year
I've tried this, but can't get the expected result:
sum(Aggr(Sum(WARENWERT), [BESTELDATUM.autoCalendar.YearMonth]))
year | month | order | order amount | amount per month | cumulative in year |
2021 | Jan | 123 | 250 | 500 | 500 |
2021 | Jan | 234 | 300 | 500 | 500 |
2021 | Feb | 345 | 200 | 600 | 1.100 |
2021 | Feb | 456 | 400 | 600 | 1.100 |
2021 | MAR | 567 | 150 | 150 | 1.250 |
Many thanks for your proposals
Hi, with this script:
tmpData:
LOAD * Inline [
year,month,order,order amount
2021,Jan,123,250
2021,Jan,234,300
2021,Feb,345,200
2021,Feb,456,400
2021,MAR,567,150
]
This expression returns the values accumulated by month:
RangeSum(Above(TOTAL If(month=Above(TOTAL month),0,sum(TOTAL <month> [order amount])),0,RowNo(TOTAL)))
Hi many thanks. This will summarize the amounts over ALL years. Have an Ide, how to generate the sum per year?
Hi, maybe this? : RangeSum(Above(TOTAL If(month=Above(TOTAL month),0,sum(TOTAL <year,month> [order amount])),0,RowNo(TOTAL)))