Solved Display "N/A" on Sum code

Valient

Member
Local time
Today, 10:51
Joined
Jun 21, 2021
Messages
48
Hi AW Team,
Good day.

I would like to ask your assistance again regarding the code.

In the FORM under DATA , CONTROL SOURCE, I use the below code to sum the number of "Closed" value in "Status"
=Sum(IIf([Status]="Closed",1,0))

It works fine as per the code.
However, I want to improve the code by: If there is no "Closed" value in "Status", it should display "N/A"

Thank you
 
Getting a bit messy, but you can try:
Code:
=IIf(Sum(IIf([Status]="Closed",1,0)) > 0, Sum(IIf([Status]="Closed",1,0)), "N/A")
 
Getting a bit messy, but you can try:
Code:
=IIf(Sum(IIf([Status]="Closed",1,0)) > 0, Sum(IIf([Status]="Closed",1,0)), "N/A")
Thank you very much. Solved
 

Users who are viewing this thread

Back
Top Bottom