8 Replies Latest reply: Apr 27, 2015 2:22 AM by Pragya Agrawal

# Help for calculation

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?

• ###### Re: Help for calculation

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

• ###### Re: Help for calculation

Can you post an example?

• ###### Re: Help for calculation

See if this helps? PFA

• ###### Re: Help for calculation

something like this:

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

• ###### Re: Help for calculation

Perfect, thanks.

• ###### Re: Help for calculation

hi

Also try this

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

Regards

vishwaranjan

• ###### Re: Help for calculation

Hi Vishwaranjan,

Why id>3 ?

I'm not sure what does it mean ?

Cheers,

Kenneth

• ###### Re: Help for calculation

Hi,

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

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

Thanks,

Pragya