Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello togehter,
I have a column with the monthly periods (1, 2, 3, ...) and a column with values.
Column1 = Period (1, 2, 3, ...)
Column2 = MVerb (1215, 545464, 45889)
Column3 = Part
Example source:
Period | MVerb | Part |
1 | 2 | 1001 |
2 | 5 | 1001 |
3 | 6 | 1001 |
4 | 8 | 1001 |
5 | 11 | 1001 |
1 | 5 | 1002 |
I need the sum of the current month (period = current month) and the sum of the last three months (period = last three months).
Assuming that the current month is May, i.e. 5, the first formula should be: Period = month (today) -> 5)
The second formula: period between 4 and 2, based on today (5).
Result:
current month | last three month | total | part |
11 | 19 | 32 | 1001 |
5 | - | 5 | 1002 |
How can I get the sum of period, if the current month is always to be used for the calculation?
I hope you can helf me 😄
Hi, current month can by: Sum({<Period={$(=Num(Month(Today())))}>} MVerb)
Previous 3 months: Sum({<Period={">=$(=Num(Month(Today()))-3)<=$(=Num(Month(Today()))-1)}>} MVerb)
If you want to mix differnt years you will need a period field that includes year and month.
Btw: your Result table shows 5 for 1002 part, and it's period is '1', not '5'
Hi, current month can by: Sum({<Period={$(=Num(Month(Today())))}>} MVerb)
Previous 3 months: Sum({<Period={">=$(=Num(Month(Today()))-3)<=$(=Num(Month(Today()))-1)}>} MVerb)
If you want to mix differnt years you will need a period field that includes year and month.
Btw: your Result table shows 5 for 1002 part, and it's period is '1', not '5'