Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
another (basic?) question:
I have Expr1 and Expr2 as two variables. I want to compare them:
=if(($(Expr1))>($(Expr2)),$(Expr1),$(Expr2))
But QV will no return anything.
The same happens if I use rangemax for this.
Is there any way to compare variables?
Regards.
Hello Nizam, Fabrice,
thank you for your help, the issue is solved already.
Cheers!
Excellent
What was the answer ?
Fabrice
Hi Fabrice,
it is explained (not very deeply anyway) in my third post in this thread: the expressions I was using for the variables were not EXACTLY the ones I had posted: they had more conditions and were formatted as currency.
Just to make my question easier to read, I simplified the expressions as below, removing non mandatory conditions and the currency formatting. I did the same in my QV document, just to give a try... and that did the job.
It works with the expressions written like this:
Expr1:num(sum({<"Date"={"<=$(=date(DateID,'DD/MM/YYYY'))"}>} "Amount"))
Expr2:num(sum({<"Date"={"<=$(=date(DateID-30,'DD/MM/YYYY'))"}>} "Amount"))
And I was comparing them in text box. The values for Expr1 and Expr2 were correctly shown in other two text boxes.
But I was not using exactly the syntax above for the variables and it seems to be the reason for them not to be correctly compared.
Now they are correctly evaluated and compared with rangemax or with if(($(Expr1))>($(Expr2)),$(Expr1),$(Expr2))
Best regards!