Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Previous Function in Webi

Status
Not open for further replies.

TracieN

Programmer
Mar 12, 2020
1
0
0
US
Can someone explain to me why the Previous function does not work as expected in the below formula? It seems to work perfectly when I only have 1 or 2 clients. On Gardin, the first row should say No Credit because the Weight of Part is =< the Previous Weight of Part.

= If IsNull ([Authorized Case Credit Total]) Then "PSX Not Started" Else If [Investigation Client ID] = Previous ([Investigation Client ID]) And ([Weight of Part(s)] <= Previous([Weight of Part(s)])) Then "No Credit" Else ([Authorized Case Credit Total])

See attachment of data.

Investigation Client ID Weight of Part(s) Authorized Case Credit Total
Alexander 44.93 67.57
Alexander 39.71 No Credit
Bass Null PSX Not Started
Gardin 44.27 59.15
Gardin 44.27 No Credit
Gardin 44.93 59.81
 
I am not sure how Previous works in WebI, but in Crystal Reports is it very important the make sure the data is sorted correctly. It will look at the previous record and thus if you have multiple records with similar information (i.e., Investigation Client_ID), then it will possibly look at the wrong data. Are doing grouping on the investigation Client_ID and the function is in the details?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top