Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I came across a video of developing a butterfly chart on qlikview and found it really interesting (link: https://veblr.com/watch/361f90967d31/how-to-create-tornado-or-butterfly-chart-in-qlikview?lang=en)
If you notice, the trick is to multiply the previous year's values with -1 to get them on the left side of the axis.
I could make the chart but now the issue is that the data values in tool-tip are showing as negative (see attached photo). Does anyone know of a possible way to make the actual & correct data values show on the tool-tip?
I am new to QV so any help would be much appreciated
-Shivi
Have you tried using the DUAL() function?
dual( s , x )
Forced association of an arbitrary string representation s with a given number representation x. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. This function can be used in scripts and chart expressions.
In scripting, the dual function is typically used early in the script, before other data is read into the field concerned, in order to create that first string representation, which will be shown in list boxes etc.
Note!
If a dual value is too large to fit in a field object, it will be represented by ## and not truncated with ... like a string.
Example (scripting):
load dual ( string,numrep ) as DayOfWeek inline
[ string,numrep
Monday,0
Tuesday,1
Wednesday,2
Thursday,3
Friday,4
Saturday,5
Sunday,6 ];
load Date, weekday(Date) as DayOfWeek from afile.csv;
The script example will generate a field DayOfWeek with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field.
There are more samples here in the forum that shows how to create a butterfly chart, just search for butterfly chart.
I think the most easy way to change the tooltip is to change the number format on number tab for the negative values (which you can define without a minus sign) like
# ##0; # ##0
Hey,
when I tried this, the minus sign is going but I am getting ## 0. I just changed the number format to fixed to with 1 decimal and format matter to "# ##0; # ##0". Am I doing something wrong?
That's because the number format is inconsistent with the 1000s separator. if you use "# ##0; # ##0" as a format, make sure that <space> is the 1000s separator. Or use ',' as the 1000s separator, and "#,##0;#,##0" as the format.
Awesome, done ! Thank you soo much