Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to display number in two different formats in the same measure in a bar chart. The bar chart measure has two measures working on an if condition.
At the click of a button, the format of the number should change from $#,##0 to #,##0.00
The variable routine mentioned in Qlik community works on KPI but not in bar graphs.
https://community.qlik.com/t5/New-to-Qlik-Sense/Number-formatting-in-Qliksense-Bar-Chart/m-p/1400094
Could someone please help me with this.
Hi,
If you approach works in kpi, but not barchart, try to set 'Number formatting' under your barchart measure to 'measure expression' ('auto' should work too, but just in case). If you use MasterItem, try on or off 'Master measure formatting', maybe it cause something.
Be sure to align num format to in report used ThousandSep and DecimalSep symbols (you can find those in Main section in your report script). For example, your format '$#,##0' and '#,##0.00' for me not working, as I use Europe standart, ThousandSep=' '; DecimalSep=','; so for me it works only '$# ##0', '# ##0,00'.
I'm using expression 'num(Sum(value), if(vVar=1, '$# ##0', '# ##0,00'))' and it changes format in all charts:
Hi,
If you approach works in kpi, but not barchart, try to set 'Number formatting' under your barchart measure to 'measure expression' ('auto' should work too, but just in case). If you use MasterItem, try on or off 'Master measure formatting', maybe it cause something.
Be sure to align num format to in report used ThousandSep and DecimalSep symbols (you can find those in Main section in your report script). For example, your format '$#,##0' and '#,##0.00' for me not working, as I use Europe standart, ThousandSep=' '; DecimalSep=','; so for me it works only '$# ##0', '# ##0,00'.
I'm using expression 'num(Sum(value), if(vVar=1, '$# ##0', '# ##0,00'))' and it changes format in all charts:
Hi @justISO
Thanks so much for the solution.
The solution works but in a stacked bar chart the total values are still displayed in the auto format, even after selecting the measure format as measure expression. And if I switch the Total values off, the segment values are not big enough to be seen, especially if the bar size is small.
Do you have any idea how to resolve this?
Can you provide an example of what totals in bar chart you talking about? Do you mean Segment and Total lables?
yes, I mean segment and total lables
"Auto" below segments/total labels does not refer to the number format, but indicates how Qlik will display the labels. And here's the problem, because you can't tell Qlik to show all labels - it decides for itself and only displays when it fits ("Auto" means that). To see all the labels (or at least most of them) you need to view chart in full screen.