Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to display like this:
[+5.1%]
[-2.4%]
thefore I tried below:
(1) Num( x, '+0.0%; -0.0%')
(2) Num( x, '[+0.0%]; [-0.0%]')
Of course (1) was successful.
but (2) failed.
I can't use (3),(4):
(3) '[' & Num( x, '+0.0%; -0.0%') & ']'
because (3) is not smart when x is null.
(4) if( isnull(x), null(), '[' & Num( x, '+0.0%; -0.0%') & ']')
because the x is actuary very long formula.
Please advise me.
Seems that QV has slight problems in mixing brackets [] with %.
Enter an expression and fill in the required formatting by hand
HTH
Peter
hello
i tried
num(_evolution,'[+ ##0%];[- ##0%;0%]')
and it works
What about this:
if( len(x) > 0, '[' & Num( x, '+0.0%; -0.0%') & ']', null())
Seems that QV has slight problems in mixing brackets [] with %.
Enter an expression and fill in the required formatting by hand
HTH
Peter
thanks Olivier, Joseph, and Peter,
Olivier, for example:
Num(0.1234, '[+ ##0.00%]')
It return [+ 0.12%].
We expect [+ 12.34%].
As Peter says, It seems Qv's problem
or specification of format specifier.
Joseph's formula use x 2 times.
because x is very long formula,
I want to avoid it if possible.
Peter's method is interesting.
suggest to check your spelling,
here it works and delivers correct formatting:
The problem with QV seems, that you are not able to copy this formatting to another expression, but you need to enter the formatting string by hand for each expression ...
Peter