Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help for calculation

Udklip.JPG

This is a very simple data snip. I like to show which fruits people eat when the eat eg. Lemon.

I select 'Lemon' in my filter

I won't take ID 3 into the calculation as he doesn't eat Lemon which leaves me with ID 1 and ID 2.

I like to show that:

1 pieces of apple

3 pieces of banana

5 pieces of orange

has been eated.

How do I created a 'measure' to deal with the problem?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

sum({<Fruit=,ID=p(ID)>}Pieces)


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar

sum({<Fruit=,ID=p(ID)>}Pieces)


talk is cheap, supply exceeds demand
Not applicable
Author

Can you post an example?

sunny_talwar

See if this helps? PFA

JonnyPoole
Employee
Employee

something like this:

Sum( {<Fruit=,id=p( {<Fruit=Fruit>} id )>} Pieces)

Not applicable
Author

Perfect, thanks.

Not applicable
Author

hi

Also try this

Aggr(sum(if(id<>3,Pieces)),Fruit)

Regards

vishwaranjan

Not applicable
Author

Hi Vishwaranjan,

Why id>3 ?

I'm not sure what does it mean ?

Cheers,

Kenneth

pragyaagrawal
Partner - Contributor III
Partner - Contributor III

Hi,

In below expression " <> " means,  NOT EQUAL TO.

Aggr(sum(if(  id<>3  ,Pieces)),Fruit)


Thanks,

Pragya