Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am looking for a help to write a set analysis for a query. Suppose my data looks as below:
data:
Load * Inline
[person,day,sales
a,sun,10
a,mon,20
a,tue,30
b,thu,22
c,mon,20
d,sun,12
d,mon,11];
I require to show person wise sales having sales on 'sun' AND 'mon' both days. Thus the result table should looks as below:
Person | Sales |
---|---|
a | 30 |
d | 22 |
Regards,
Som
or this
Sum({<person = p({<day = {'sun'}>})*p({<day = {'mon'}>}), day = {'sun', 'mon'}>}sales)
May be this
Sum({<person = p({<day = {'sun'}>})*p({<day = {'mon'}>})>}sales)
or this
Sum({<person = p({<day = {'sun'}>})*p({<day = {'mon'}>}), day = {'sun', 'mon'}>}sales)
Thanks Sunny.