Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kaushi2020
Creator II
Creator II

How to add a percentage symbol post expression

HI all, below expression provides a value. I want to show a percentage symbol once the IF condition is true. 

below is my expression:

if((if(Units='%',Num(Sum([Jun-2023]/100),'##.00') ,Num(Sum([Jun-2023]),'##.00'))) > 1000000,
num((if(Units='%',Num(Sum([Jun-2023]/100),'##.00') ,Num(Sum([Jun-2023]),'##.00')))/1000000, '#.##0,##M', ',', '.'),
if((if(Units='%',Num(Sum([Jun-2023]/100),'##.00') ,Num(Sum([Jun-2023]),'##.00'))) > 1000,
num((if(Units='%',Num(Sum([Jun-2023]/100),'##.00') ,Num(Sum([Jun-2023]),'##.00')))/1000, '#.##0,##K', ',', '.'),
num((if(Units='%',Num(Sum([Jun-2023]/100),'##.00') ,Num(Sum([Jun-2023]),'##.00'))), '#.##0,##', ',', '.')))

 

when I concatenate a percentage symbol post the IF true block, there is a change in the values which it display. pls see image for more info. 

Please suggest. 

kaushi2020_0-1690364145409.png

 

Labels (2)
2 Replies
Mark_Little
Luminary
Luminary

u need to add it to your num() function. something like below

'#,##0.0%;(#,##0.0)%;-'

Also ensure the measure Number Formatting is set to Measure expression.

kaushi2020
Creator II
Creator II
Author

Thanks for the swift reply. I changed to below way. let me know if I am in sync with your suggestion.  Still I cannot see percentage symbol. let me know if I am missing anything. 

if((if(Units='%',Num(Sum([Jun-2023]/100),'#,##0.0%;(#,##0.0)%;-') ,Num(Sum([Jun-2023]),'##.00'))) > 1000000,
num((if(Units='%',Num(Sum([Jun-2023]/100),'#,##0.0%;(#,##0.0)%;-') ,Num(Sum([Jun-2023]),'##.00')))/1000000, '#.##0,##M', ',', '.'),
if((if(Units='%',Num(Sum([Jun-2023]/100),'#,##0.0%;(#,##0.0)%;-') ,Num(Sum([Jun-2023]),'##.00'))) > 1000,
num((if(Units='%',Num(Sum([Jun-2023]/100),'#,##0.0%;(#,##0.0)%;-') ,Num(Sum([Jun-2023]),'##.00')))/1000, '#.##0,##K', ',', '.'),
num((if(Units='%',Num(Sum([Jun-2023]/100),'#,##0.0%;(#,##0.0)%;-') ,Num(Sum([Jun-2023]),'##.00'))), '#.##0,##', ',', '.')))

 

Also changed to Measure expression.

kaushi2020_0-1690370143832.png