(please excuse that I didn’t use aliases). I would like my query output to say “none” if 3rd qrtr sales equals 4th quarter sales, but my output is just saying “up” when they equal each other. Please help me correct this code
trend: IIf([qryQuarterlyCustomersales3rdQuarter_final]
.[3rd qrtr sls]=[qryQuarterlyCustomersales4thQuarter_final]
.[4th qrtr sls],"none",
IIf([qryQuarterlyCustomersales3rdQuarter_final]
.[3rd qrtr sls]>[qryQuarterlyCustomersales4thQuarter_final]
.[4th qrtr sls],"down","up"))
Are you sure the two values are exactly the same?
As written there appears to be a slight mistake in the inner
iifstatement, but that doesn’t explain the results you’re currently getting.Pseudocode helps me understand how these expressions work:
*note that
elseis implied; not legal syntax hereMaking as few changes as possible, this should work as you expect it to:
Documentation: