Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Negative and positive value in legend of chart

Dear,

I have created a chart with negative and positive value but i would like to have the negative value showed in the legend.

Actually it is showing only positive value

Kind regards

Michael

4 Replies
Partner
Partner

Re: Negative and positive value in legend of chart

no way..any how you can't get what you require but what right now you are doing with 2 expressions, can be done with only one expression also..check the app...

Partner
Partner

Re: Negative and positive value in legend of chart

Pie charts does not support negative values.

Either do sum(fabs(Score)) in your chart, not fabs(sum(Score)) since the total sum does not have to be negative, as for Japan.

I think you want the sum of absolute values, not the absolute sum of values?

However, you could do something similar to this in your script for better UI performance:

LOAD * INLINE [
    Country, Score
    US, 4971.765
Japan, -200.941
    5 EU, 141.181
    RoW, 735.292
]
;

2:
NoConcatenate
load
Country
,
Score
,
num(PurgeChar(Score, '-')) as ScoreInverted

,money(PurgeChar(Score, '-')) as ScoreInvertedMoney

resident 1;
drop table 1;

Highlighted
Partner
Partner

Re: Negative and positive value in legend of chart

Hi,

See attached solution File.

My solution is to change the dimension, so that the measure in calcluated in the dimension.

I added the repeat function so that the alligned is better (although nog perfect)

Country &Repeat(' ',20-len(Country)-len(AGGR(sum(Score), Country)))&AGGR(sum(Score), Country)

Not applicable

Re: Negative and positive value in legend of chart

Hi all,

Thank you for your solutions.

I will see what the best fit for our client

Kind regards