Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bbmmouha
Creator
Creator

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

1 Solution

Accepted Solutions
oknotsen
Master III
Master III

Something like this?

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

May you live in interesting times!

View solution in original post

5 Replies
MK_QSL
MVP
MVP

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

difference between the two products

oknotsen
Master III
Master III

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

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

May you live in interesting times!
bbmmouha
Creator
Creator
Author

it works thanks a lot

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


oknotsen
Master III
Master III

Something like this?

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

May you live in interesting times!
bbmmouha
Creator
Creator
Author

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