Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

Try disregarding your selection in the total calculation, maybe like

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

Not applicable
Author

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

Not applicable
Author

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

swuehl
MVP
MVP

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

Works for me.

Just give it a try.

MayilVahanan

Hi

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

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

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.

MayilVahanan

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)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

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