I have made a query and in that query each month in a year is indicated by a number. SO that:
January = 1
February = 2
etc.
To get the latest month - September I can get retrive the month number this way:
DMax("[måned]";"[CP kat impl]";"[År] = " & DMax("[År]";"[CP kat impl]"))
The above formula will give me a result = 9
To get August I can retrive it with this:
DMax("[måned]";"[CP kat impl]";"[År] = " & DMax("[År]";"[CP kat impl]"))-1
etc.
But I can't seem to make it work in my report?
The report should only show the 3 past month (July, August, september now) and I thought I can make a formula in the report like the above. But it get an error. Any suggestions?
January = 1
February = 2
etc.
To get the latest month - September I can get retrive the month number this way:
DMax("[måned]";"[CP kat impl]";"[År] = " & DMax("[År]";"[CP kat impl]"))
The above formula will give me a result = 9
To get August I can retrive it with this:
DMax("[måned]";"[CP kat impl]";"[År] = " & DMax("[År]";"[CP kat impl]"))-1
etc.
But I can't seem to make it work in my report?
The report should only show the 3 past month (July, August, september now) and I thought I can make a formula in the report like the above. But it get an error. Any suggestions?