Forum Discussion

mithiladas02's avatar
mithiladas02
Helper I
4 years ago
Solved

Concatenate syntax

Hi,

 

I am using this 

Test=cancatenate(format(divide([a],[b]), "#.0%" & Unichar(10)), (" (" & if [a]=0, "0")& "/" & if ([b]=0, "0",[b])& ")"))

using this syntex i am getting parenthesis for all except zero. PLease see the picture. I want to remove Parenthesis from 0 only and keep parenthesis to all value. I have tried to write the syntex like below.

 

Test=cancatenate(format(divide([a],[b]), "#.0%" & Unichar(10)),  if format([a]=0, "0","(#,#)")& "/" & if ([b]=0, "0",format([b],"(#,#")))

 

but results coming like (123)/(456) and with zero it didnt show () sign. 

I want my result (123/456) and when any row comes 0,it will show only 0.

 

Please help me to figure out this syntex.

 

Thanks in advance.

 

  • Test=IF(a=0,0,format(divide([a],[b]), "#.0%") & Unichar(10) & "(" & a & "/" & b & ")")

1 Reply

  • Test=IF(a=0,0,format(divide([a],[b]), "#.0%") & Unichar(10) & "(" & a & "/" & b & ")")