Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!!!
Dual() function returns STRING to the front-end while the qv internally treats it numerically. Therefore, you can't format data numerically of a returned string. Hope this makes sense.
As I have explained in my 1st approach number is being formatted but the text after it is not displayed.
dual(s,x) is used in the script and is designed to apply a number representation to a string. s = string and x = number
e.g. dual('January', 1) as Month
(normally you would use a field)
see Help section
Well, got you. Can you post a sample. From a single dual, it might not be possible in the front-end. Or, you might want to use DUAL over another DUAL to get what you want, something like:
Dual(Num(Dual(Txt, Expression), '##.00#'), Expression) as Txt_Num_Dual
Note, here the highlighted part would be treaded as text while you will see text and number both.
I have shown my chart below:
dual(num(Max(salary),'#.##0'), FirstSortedValue(DISTINCT [NAME], -aggr(max(salary),[Date],NAME)))
The above expression is working fine. But you can see Y-axis values(highlighted in oval) are not formatted.
What is your dimension?
Its category. Each category has a list of people. the person having highest salary in each category is displayed as Y-axis value along salary.
, Please post a sample. How to prepare example for upload
My actual qlikview file has expression of 7-8 lines. I tried making it simple and explained above. So my qlikview file has huge data and really big expressions. So there s no sample here.