I want to place a result with this attempt:
=Abs(sum(Month([Salgsdato]=8 and (Year([Salgsdato]=([Startår]-1))
Dateformat is dd.mm.yyyy
Unforunately something is wrong
Appreciate if someone can tell me how to correct it.
Thanks
I want to place a result with this attempt:
=Abs(sum(Month([Salgsdato]=8 and (Year([Salgsdato]=([Startår]-1))
Dateformat is dd.mm.yyyy
Unforunately something is wrong
Appreciate if someone can tell me how to correct it.
Thanks
That expression makes no sense. What field do you want to Sum?
"Something is wrong" doesn't tell us much. What is error message?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
From a spesific table I have various values in the field «salgsdato» all values only with the month 8 and year spesific f.eks. 2018 shall be added.
did you understand?
Still did not specify which field needs to be summed. You only show the conditional criteria.
=Sum(IIf(Month([Salgsdato])=8 And Year([Salgsdato])=[Startår]-1, fieldname, 0))
Or do you really want to count how many records meet the criteria?
=Sum(IIf(Month([Salgsdato])=8 And Year([Salgsdato])=[Startår]-1, 1, 0))
or
=Count(IIf(Month([Salgsdato])=8 And Year([Salgsdato])=[Startår]-1, 1, Null))
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank you so much - the error was only one parantes ahead of Year . Now everything is working good.