Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 OmarBenSalem
		
			OmarBenSalem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ALL,
I have a 2 fields as follow:
I want to transform them to percentage %:
so, this is how I proceed:
but I still have the same result:
num(num#( [Notional_Variation],'#.##') ,'# ##0,00%') AS [Notional_Variation],
num(num#( [Threshold_Variation],'#.##') ,'# ##0,00%') AS [Threshold_Variation],
What should I do?
 juraj_misina
		
			juraj_misina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Omar, one more thought. I see that your input and output fields have the same name. Can you try renaming the output field? If I remember correctly this could be a side effect of Qlik's dual data type. The value is displayed in that format in which it was loaded for the first time. So if you are just "reformating" the same field, this might not work as expected.
 
					
				
		
 brunobertels
		
			brunobertels
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
In your straight table did you chek the output format ?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How does your environmental variable look like? Can you share the script for that?
 OmarBenSalem
		
			OmarBenSalem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		No, I want to do it in the script; because I'll be directly sending this table into a web service that's directly send emails ...
one stupide Idea to format and show by %:
left( [Notional_Variation]*100 ,4) &'%.' AS [Notional_Variation],
left([Threshold_Variation]*100 ,4)& '%.' AS [Threshold_Variation],
result:
 OmarBenSalem
		
			OmarBenSalem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		SET ThousandSep=' ';
SET DecimalSep='.';
SET MoneyThousandSep=' ';
SET MoneyDecimalSep='.';
SET MoneyFormat='# ##0,00 €;-# ##0,00 €';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';
SET FirstWeekDay=0;
SET BrokenWeeks=0;
SET ReferenceDay=4;
SET FirstMonthOfYear=1;
SET CollationLocale='fr-FR';
SET CreateSearchIndexOnReload=1;
SET MonthNames='janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.';
SET LongMonthNames='janvier;février;mars;avril;mai;juin;juillet;août;septembre;octobre;novembre;décembre';
SET DayNames='lun.;mar.;mer.;jeu.;ven.;sam.;dim.';
SET LongDayNames='lundi;mardi;mercredi;jeudi;vendredi;samedi;dimanche';
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Your decimal separator is . and not ,, right?
try this may be
num(num#( [Notional_Variation],'#.##') ,'# ##0.00%') AS [Notional_Variation],
num(num#( [Threshold_Variation],'#.##') ,'# ##0.00%') AS [Threshold_Variation],
 OmarBenSalem
		
			OmarBenSalem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		that won't do it Sunny, since every time Qlik finds the %, he will automatically divide the value by 100, but won't show the % sign:
that's why, I added . next to %, to force qlik to show the % and then I 'll have email like follow:
 juraj_misina
		
			juraj_misina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Omar,
have you tried specifying decimal and thousands separatos in Num()?
num(num#( [Notional_Variation],'#.##') ,'# ##0,00%', ',', ' ') AS [Notional_Variation]
Juraj
 OmarBenSalem
		
			OmarBenSalem
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes Juraj,
That was one of my first tries:
num(num#( [Notional_Variation],'#.##') ,'# ##0,00%', '.', ' ') AS [Notional_Variation]
 juraj_misina
		
			juraj_misina
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Omar, one more thought. I see that your input and output fields have the same name. Can you try renaming the output field? If I remember correctly this could be a side effect of Qlik's dual data type. The value is displayed in that format in which it was loaded for the first time. So if you are just "reformating" the same field, this might not work as expected.
