Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ksharpes
Creator
Creator

Number format by expression

I have a bar chart for the values which will switch between a number, a currency and a percentage and I would like for it to show the correct number format based on whats selected.

Also for the Currency I want the "Auto" format but with the currency symbol for example, €12.34M

7 Replies
Claudiu_Anghelescu
Specialist
Specialist

There is a field used for the switch between Number and Percentage?

To help community find solutions, please don't forget to mark as correct.
ksharpes
Creator
Creator
Author

Correct, however I want the Number format held within the expression as it needs to change based on the values shown.

manoranjan_d
Specialist
Specialist

Ifyou are switch between number  currency and a percentage-->use alternative measure

 

in the first alternative pass the percentage in the exp  asnum(your exp,'######.00%') foramt-->measure exp

in the second alternative pass with currency  exp as num(your exp,'########### ###,00  €') and pass the num format as auto.

Claudiu_Anghelescu
Specialist
Specialist

Measure:

 

=if(Field='Number',  num(expr,'########### ###,00  €'),

num(expr,'######.00%') )

To help community find solutions, please don't forget to mark as correct.
ksharpes
Creator
Creator
Author

The Percentage format is correct but the currency one doesn't work

clipboard_image_1.png

Your expression is on the left but i want it to look like the right but with currency symbol.

Claudiu_Anghelescu
Specialist
Specialist

=if(Field='Number', num(expr,'€ #.##0,00'),

num(expr,'###.00%') )

To help community find solutions, please don't forget to mark as correct.
Claudiu_Anghelescu
Specialist
Specialist

Check this:

 

 

To help community find solutions, please don't forget to mark as correct.