AnsweredAssumed Answered

Portal Sorting

Question asked by mehbastan on Sep 30, 2015
Latest reply on Oct 4, 2015 by user19752

Hi Everyone

This is the second time I write this question but I am not sure what happen to the first one.

 

I have a simple solution to record sales, some what like the invoicing solution. I have 3 Tables

School

Sales

Sales_Items

and they are related via primary keys. In the sales portal that is on School layout (Sorted by Date, descending) I have 6 fields

Date

Gross Sales

Rebates

Avg Sales

Changes

Created on

I need to have the Filed CHANGES show me the difference between last year's Gross and this year's Gross in Percentage

The calculation I have is

Case(

Get ( RecordNumber )  >  1 and not IsEmpty ( GrossSales) ; Round (GrossSales/ GetNthRecord ( GrossSales ; Get ( RecordNumber )  -  1 )   - 1;  4 )

)

The problem is that the latest CHANGES is blank and other rows are calculated correctly but I need the first record to show the difference between the latest record and any other after that.

I hope that make sense.

Capture.JPG

Outcomes