Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QV users,
i have a problem with calculated fields.
I've imported some txt files and i create a table with some fields and calculated ones.
I don't know why the column "LABEL4" ([LABEL1]-[LABEL2]-[LABEL3]) don't show me any value but only a minus (-).
If correct, the total of "LABEL4" should be the same of the total of "LABEL1".
I think that the problem is in the expression "LABEL2":
Num(If([FIELD4]=1,
Num(Left([FIELD2],5)
& ',' &
Num(Right([FIELD2],2)
,0))))
and "LABEL3":
Num(If([FIELD4]=1,
Num(Left([FIELD3],2)
& ',' &
Num(Right([FIELD3],2)
,0))))
Please, can someone help me?
Thanks,
Mattia
Hello Mattia,
I believe your if statements have to be reworked a bit. Without sample data is hard to say but it seems they are returning nulls therefore the operation [LABEL1] - [LABEL2] - [LABEL3] result is null which is represented by a -
My suggestion is to evaluate each LABEL on it's own before calculating LABEL4.
Try this for LABEL2 (and same idea of the LABEL3). I just moved the closing parenthesis....
num(If([FIELD4]=1
,num(Left([FIELD2],5)& ',' &Num(Right([FIELD2],2)))
,0
)
)
Hello Mattia,
I believe your if statements have to be reworked a bit. Without sample data is hard to say but it seems they are returning nulls therefore the operation [LABEL1] - [LABEL2] - [LABEL3] result is null which is represented by a -
My suggestion is to evaluate each LABEL on it's own before calculating LABEL4.
Try this for LABEL2 (and same idea of the LABEL3). I just moved the closing parenthesis....
num(If([FIELD4]=1
,num(Left([FIELD2],5)& ',' &Num(Right([FIELD2],2)))
,0
)
)
I believe that means that there is more than one possible value for that expression. If you use a listbox and select only one value for Field 2 or Field 3, it should show some value. You may need to use set analysis or other logic to get it to display what you want.
Thanks guys for the message.
I'll try and i'll let you know!
Mattia
Thank you so much, Alberto!
Now, it works!!!
Have a nice day,
Mattia