Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 MAR 1999 01:12:26AM Mark Watford wrote:

last.purch last.qty

01/01/99 4

01/02/98 0

01/02/99 10

This is an example of my problem, writing a Formula to count

last.qty and to eliminate the values which equal 0. I can count last.qty using count(@record,@vm)which will give me the total count

Using count can you count only the values in a multivalue field which

eq 0. What I have found is that the count feature in a formula or subroutine looks at a string and picks out any number which has a 0 in it. Does anyone have a sugestion.


At 23 MAR 1999 04:40AM Richard Wilson wrote:

If I read your question correctly then you only want to know

the number of purchase orders where the last.qty is not equal zero.

If this is correct then you will need something like the following

rbasic formula

CT=COUNT({LAST.QTY},@VM) + ({LAST.QTY} NE "")

TEMP.CT=0

FOR I=1 TO CT

IF {LAST.QTY} + 0 NE 0 THEN TEMP.CT=TEMP.CT + 1

NEXT I

@ANS=TEMP.CT

there maybe more efficient ways to perform the above, but I still

tend to write code with syntax which I know would transfer to other versions of the Pick model

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/fc221938f4f6582c8525673d001c9b01.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1