Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have data like
Rep | Item | Sales |
Stella | Iphone | 15000 |
Parker | Iphone | 25000 |
Micheal | Iphone | 25400 |
Stella | Samsung | 14200 |
Parker | Samsung | 2300 |
Micheal | Samsung | 14500 |
and i want to to display the representative who has sell only Iphones, for that i had written set expression as below
sum({$<Rep=P({1<Item={'Iphone'}>}Rep)>}Sales);
This expression shows all the rows, but i want the output like
Rep | Item | Sales |
Stella | Iphone | 15000 |
Parker | Iphone | 25000 |
Micheal | Iphone | 25400 |
Regards
Kalyan
May be try:
Sum({<Item = {'Iphone'}>}Sales)
Your expression -> sum({$<Rep=P({1<Item={'Iphone'}>}Rep)>}Sales)
is summing sales for all Reps who sell Iphone and since all of them sell Iphone you see them all.
Hi
While writing a condition for iphone u have to write item=iphone but u have written rep=iphone
sum({$<Item={'Iphone'}>}Sales)
or
=sum({$<Rep=p({$<Item={"IPhone"}>}Rep)>}Sales)
it will work
or
=sum({$<Rep=p({1<Item={"IPhone"}>}Rep)>}Sales)
Hi,
for salesmen who sold only iPhones, you could use:
=Sum({$<Rep={"=Only(Item)='iPhone'"}>} Sales)
hope this helps
regards
Marco
Hi Ravuri
You can use one of either way
1- sum({<F2={'Iphone'}>}F3) as suggested by Sunny
or
2-if(F2='Iphone',sum(F3))
See attached for details.
Hi,
I hope attached Application Helps you.
Thanks
Bunny
another solution for salesmen who sold only iPhones (using Marco test data)
=Sum({$<Rep={"=count(distinct Item)=1"},Item={iPhone}>} Sales)
also possible:
=Sum({$<Rep-=p({$<Item={"=Item<>'iPhone'"}>} Rep)>} Sales)
regards
Marco