Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Sum select list from list box

Ok so what I'm trying to do is sum all values in a list box (100%) of values but only display the ones I have selected in the list box. The sum function I'm using works (sum(Discharges) / sum( total <DischargeYear,DischargeQuarter> Discharges) ) to show me the correct values in the graph, but when I only select 2 or 3 fields from the list box it changes the values in the graph and they become the 100%. How do i keep a sum of 100% but only select a few fields.

example:

yellow = 5

blue = 20

green =50

black=10

red =15

all will total 100% and I could put this in a graph, but the minute I select Yellow and green (to display in the graph)  I still want to see yellow is 5% and green is 50%, and not the new selected (yellow and green) having the values 90% and 10%.

9 Replies

Re: Sum select list from list box

Hi

     Do you mean, no change in the graph value?

     if so, use Sum({1}Discharges) / sum({1} total <DischargeYear,DischargeQuarter> Discharges)

    

     Edit:

     Then use

     Sum(Discharges) / sum({1} total <DischargeYear,DischargeQuarter> Discharges)

Hope it helps

MVP
MVP

Re: Sum select list from list box

Try disregarding your selection in the total calculation, maybe like

=sum(Discharges) / sum({1} total <DischargeYear,DischargeQuarter> Discharges)

Not applicable

Re: Sum select list from list box

yes, no change to the graph value, but it would only display yellow and green.

Not applicable

Re: Sum select list from list box

I don't want to disregard the select because I now only want to display Yellow and green, not all in the list box.

MVP
MVP

Re: Sum select list from list box

I think I've understood, as I said, only disregard selection for the total value calculation.

Works for me.

Just give it a try.

Re: Sum select list from list box

Hi

=sum(Discharges) / sum({1} total <DischargeYear,DischargeQuarter> Discharges)

This wil help you.. Can you provide a sample file?

Not applicable

Re: Sum select list from list box

I think this is the correct answer, but now I'm getting a odd fraction in %'s. I know I'm talking about discharges... but my example I would have like .82% for yellow and .3% fro green. Graph still looks correct, just not sure how to get the values back 90% and 10 % values.

Re: Sum select list from list box

HI

     For 90% and 10%, use

=sum(Discharges) / sum(total <DischargeYear,DischargeQuarter> Discharges)

For 5% and 50%

=sum(Discharges) / sum({1} total <DischargeYear,DischargeQuarter> Discharges)

MVP
MVP

Re: Sum select list from list box

Could you post a small sample file? Probably there is some more complexity in your data than in the sample above.

Community Browser