0

COUNT combined with maximum value of one field

Hi all!

We are using Navision 4.0 and JetReports 7.1.2.

I am trying to build a Sales Header count using
=NL("Count";"Verkaufskopfarchiv";"Nr.";"Versionsnr.";"1";"Verk. an Deb.-Nr.";$B13;"Buchungsdatum";PeriodeFIlter)
Please refer to the field "Versionsnr." which is a counter from 1 to any higher number and only the last count is the - after all - relevant sales header I want to count. To any archived sales header there may exist several versions which all have the same header no. but a different (increasing) version no.

Counting only no. "1" will not solve my problem because the sales header may be carried forward through several periods so when filtering by the booking date ("Buchungsdatum") the irrelevant 1st. version may be placed in the one period while the relevant last version in another. And additionally I try to sum amount and quantity which may be changed in different versions.

How can I count and filter only those headers which contain the maximum value of the currently counted header no.?

Thanks for your efforts
best regards
Frank

2 comments

Please sign in to leave a comment.