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: 
Not applicable

Number format in dual expression

Hi,

I'm working on a bar chart where the bar chart expression is something like this dual(int,string).

Here I want to format integer to #.##0 .

I tried following 2 approaches :

1. In number Tab I tried making it integer. Formatting does work but the string in dual function wont be displayed. I mean only number is displayed without string after that.

2. I tried formatting using num function. In this case expression value is formatted and even the text after number is displayed. But the problem is Y-axis value are not formatted.

Can any one please help me to format Y-axis values as well as integer in dual expression result.

Thanks in advance!!!

13 Replies
Not applicable
Author

Hi All,

I found solution to my question.

Here the problem was I cannot use formatting under "Number" as I'm using dual(int string). So what I have done is I have taken one more dummy expression something like num(100000,##,##0) and formatted this expression using "Number" tab. I think because this is my first expression in the chart, Y-axis is formatted with whatever is given in number format. And I have made this expression invisible(not disabled) so that this expression is considered for axes formatting. Now my actual expression which is dual(int,string) is written as dual(num(int,##,##0),string) which formats expression output(not Y-axis value).

By this both Y-axis and expression value are formatted as shown below

christian77
Partner - Specialist
Partner - Specialist

Hi.

State formats in the expression and then use Expression Default in the number tab.

Salutes.

Not applicable
Author

Hi Cristian,

Whatever you have said wont work in my case. So I have explained my approach. And  it works perfectly fine. That is the correct answer for my question.

I'm not sure whether I can accept my own ans as correct ans as I have only posted the question and found ans later. Because there are few discussion forums where we cannot accept our own answer.

Thanks!!!

richard_cioci
Creator
Creator

Hey Kavi,

I too am having this problem. I was using dimension limited to 18 largest values for my monthyear field, but the problem was that it applies the dimenion limit to the sales rather than the largest dimension. So I had to add an invisible expression equal to monthyear so that it did dimension limits properly, but when I unchecked the line graph option, my axis formatting went to crap, which is such a stupid design flaw from Qlik.

Anyway, the solution is to enable the expression, uncheck the line, or also check invisible, and then check text on pop-up, for some reason it restores the number format (as long as the field is a dual).

I know it's 2 years too late, but hopefully this helps someone.