5 Replies Latest reply: Mar 4, 2015 11:28 AM by bbm mouha

# PROBLEM OF DIFFERENCE OF SUM

i have a problem and i need help

i'm a debutant

i have a dimension that contain products for exemple A B C D E F

i want to see the difference between the two products that he selected

for exemple if he selected A B

sum(A) - sum(b)

if he selected A C

sum(A) - sum(C)

thanks for help

• ###### Re: PROBLEM OF DIFFERENCE OF SUM

Kindly don't raise same question more than once..

difference between the two products

• ###### Re: PROBLEM OF DIFFERENCE OF SUM

Use "alternate states". Create two listboxes for Products, one of them in an alternate state.

= sum({\$} Sales) - sum(({AlternateState} Sales)

• ###### Re: PROBLEM OF DIFFERENCE OF SUM

it works thanks a lot

but i want to add a dimension take into account like group product sum(({AlternateState} (G_product) Sales)

• ###### Re: PROBLEM OF DIFFERENCE OF SUM

Something like this?

= sum({\$} Sales) - sum(({AlternateState < G_product = \$::G_product> } Sales)

• ###### Re: PROBLEM OF DIFFERENCE OF SUM

thanks a lot

you are the best

finally it's like this

=sum({[\$]}NBR_VOTE) - sum({groupe2 <LIB_ELECTION=\$::LIB_ELECTION>}NBR_VOTE)

but can you explain more the expression