Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a problem to compare the current year with the previous year.
sum({$<Year={$(=Max(Year-1))}>}if(Kontonummer >= 41250000 and Kontonummer < 49300000,SummeSoll-SummeHaben))*-1
sum({$<Year={$(=Max(Year))}>}if(Kontonummer >= 41250000 and Kontonummer < 49300000,SummeSoll-SummeHaben))*-1
the problem is, the current year is 2014 and the previous year 41639.
Why is in the previous year the number????
I formatted the field WJ in the script like this
WJ,
DATE(Date#(WJ,'YYYYMMDD'),'DD.MM.YYYY') AS DATE,
DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year,
There are only two values in WJ, (20130101 and 20140101)
Instead of:
DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year
Use the Year() function:
Year(Date#(WJ,'YYYYMMDD')) AS Year,
Instead of:
DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year
Use the Year() function:
Year(Date#(WJ,'YYYYMMDD')) AS Year,
sum({$<Year={'$(=NUM(Max(Year-1)))'}>}if(Kontonummer >= 41250000 and Kontonummer < 49300000,SummeSoll-SummeHaben))*-1
sum({$<Year={'$(=Max(Year))'}>}if(Kontonummer >= 41250000 and Kontonummer < 49300000,SummeSoll-SummeHaben))*-1
Hi!
Andreas Max(Year-1) it is not correct, the corret is: (Max(Year)-1)
Or try this:
Current year => Year(Today())
Previous year => AddMonths(Year(Today()), -12)
Thank u
good to work with profis....