Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Re: Help for calculation

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


talk is cheap, supply exceeds demand
8 Replies

Re: Help for calculation

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


talk is cheap, supply exceeds demand
Not applicable

Re: Help for calculation

Can you post an example?

MVP
MVP

Re: Help for calculation

See if this helps? PFA

Employee
Employee

Re: Help for calculation

something like this:

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

Not applicable

Re: Help for calculation

Perfect, thanks.

Not applicable

Re: Help for calculation

hi

Also try this

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

Regards

vishwaranjan

Not applicable

Re: Help for calculation

Hi Vishwaranjan,

Why id>3 ?

I'm not sure what does it mean ?

Cheers,

Kenneth

pragyaagrawal
New Contributor II

Re: Help for calculation

Hi,

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

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


Thanks,

Pragya