0

Sorting Calculated Fields

Hi,

I am brand new to Jet and just starting to try and learn it. Normally I would take time to read up everywhere and try to find the answer myself from previous threads etc., but I am under a lot of time pressure just now so thought someone might be able to offer some help and guidance.

I am trying to create a simple report which compares sales in 2 periods and gives the difference between them. Basically we are dealing with just 2 fields from the Customer table: No. and Sales (LCY). I have Sales (LCY) in two columns, each with a different Date FIlter applied (Code: =NF($D8,"Sales (LCY)","Date Filter",$G$6). I can then use a simple Excel formula to calculate the difference between the two periods. This works fine.

Now the questions:

1) How do I sort by one of the Sales (LCY) columns so the largest value is at the top. I tried the following NL function, but I have something wrong in it:
=NL("Rows","Customer",,"-NF(,""Sales (LCY)"",""date filter"",""010112..311212"")","*")
I am not sure of the exact syntax of nested functions - in particular when you need two sets of double quotes "". If someone could explain briefly that would be great.

2) The next step would be to sort by the Difference column. I think I am correct in saying that the sorting has to be included in the NL function, so presumably I would need to build a calculation into the NL function to compare the sales between the two periods (perhaps using two NF functions to get the two figures) before I could then sort by the resulting value. I don't think I can sort the column if it just contains a simple excel formula, but I don't really know how to begin on this just now.

Any help or suggestions to get me over this hurdle would be appreciated, and sorry for asking first and researching later.

Thanks,
Garry.

2 comments

Please sign in to leave a comment.