Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sinanozdemir
Specialist III
Specialist III

Show "Other" in a Chart

Hello,

I am trying to show the unselected values in "other" label in a chart. In the below example, I need to show NJ and PA in another column labeled "Other":

Capture.PNG

Any feedback is appreciated.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

This may be:

If(Dimensionality() = 0,  Sum({<State=e(State)>}Amount), Sum(Amount))


Capture.PNG

View solution in original post

11 Replies
sunny_talwar

Like this?

Capture.PNG

Expression:

Pick(Dim, Sum(Amount), Sum({<State=e(State)>}Amount))

Script:

Sale:

LOAD * INLINE [

    Company, State, Amount

    A, NJ, 100

    B, PA, 200

    C, NY, 300

];

LOAD * Inline [

Dim

1

2

];

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You're showing Companies in your chart. Do you mean other companies? Mixing dimensions is pretty difficult for an end-user to interprete.

sinanozdemir
Specialist III
Specialist III
Author

I meant to say "Other Companies".

Thanks

sinanozdemir
Specialist III
Specialist III
Author

Hi Sunny,

Preferably, not creating another inline load statement.

Thanks

Peter_Cammaert
Partner - Champion III
Partner - Champion III

But that means that Company '0' may appear twice in the same chart: once as a dimension value and once hidden somewhere in the Others bar. For a QlikView end-user this display may be a bit inconsistent.

sunny_talwar

This may be:

If(Dimensionality() = 0,  Sum({<State=e(State)>}Amount), Sum(Amount))


Capture.PNG

sunny_talwar

I agree. It confused me when I was trying to create that kind of visual. I used State = e(State), but you might want to change if the requirement is different.

sinanozdemir
Specialist III
Specialist III
Author

This is awesome.

Thanks Sunny.

CarlosAMonroy
Creator III
Creator III

Hi,

I guess it is easy than it seems. You can add the following:

Sum({1-$}Amount)

Hope this helps!

Carlos