Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Y-Axis Number Format

Hi
Created a chart that shows percentages in bars.
I have set the number format of the expressions to percentage and all looked good.

I had to add an additional "first" expression for dimension limits and cleared the "Bar" checkbox for this expression to avoid impact on the chart. Although the format of this "first" expression is also set to percentage the Y-Axis numbers show now as 0.0 .. 0.5 and not as 0% - 50% any more.

Disabling the "first" expression shows the percentage format again.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Aargh, I see what you are talking about...

One workaround to this might be to explicitely define background colors in the respective expression attributes section.

See attached.

View solution in original post

6 Replies
swuehl
MVP
MVP

juerg.maier,

as far as I know, the designers control of the number formatting of the y axis is pretty limited. It will indeed take the number formatting of first expression but QV will modify it to fit the numbers to be shown. Probably one could call too much automatism here or maybe even a bug (not in coherence with users expectation).

The only work-around I can think of right now (but maybe I am missing some stuff), is to deactivate the bars for the first expression, but activate one of the display options 'values on data points', 'text on axis' or 'text as popup'.

If you set a text color of white() in the expression attribute and select option text on axis, you won't see a number, but a small spacing between your dimension values and the x-axis.

Not sure if this helps,

Stefan

Not applicable
Author

Hi Stefan
Thanks. Activating e.g. Values on Data Points for the first expression gives me back the % but also impacts the Legend colors by assigning now the wrong colors - so bar and Legend do not match. Tried a few settings to control that but without success so far.

swuehl
MVP
MVP

Hm,

I can't reproduce the issue with the wrong bar colors right now. On what version are you?

Could you upload a small sample file?

Not applicable
Author

Hi
a small example. In the legend sum1 should have a blue, sum2 a red indicator
Juerg

swuehl
MVP
MVP

Aargh, I see what you are talking about...

One workaround to this might be to explicitely define background colors in the respective expression attributes section.

See attached.

Not applicable
Author

The behavior I've observed is that the chart respects the format selected on Properties | Number | Number Format Settings, but it does not respect a custom Format Pattern from the Format group box.

Sometimes you can work around this.  I had a chart with times and wanted "h:mm" format to avoid wasting space on seconds or repeating "AM" over and over again.  Since QlikView ignores the custom format (a bug which has been around for years), I instead took my expressions and added " * 24 * 60" to convert them from times (which are fractions of days) into minutes.  I can use Integer format and get results close to what I wanted.  This wouldn't work well if my expression was in hours and minutes, however.

Has anyone tried using Dual() to try to associate a manual text format for the axis while preserving the correct numeric values?