Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
rajat2392
Partner - Creator III
Partner - Creator III

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...

magavi_framsteg
Partner - Creator III
Partner - Creator III

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;

bertdijks
Partner - Contributor III
Partner - Contributor III

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
Author

Hi all,

Thank you for your solutions.

I will see what the best fit for our client

Kind regards