Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mithiladas02
Helper I
Helper I

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 thisParenthesis.jpg 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.

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

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

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.