Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Sirs ,
What should be set expression for finding all sales id which have sold product in every quarter ?
EX- 101,104 have done above sellings in all quarter
SCRIPT
SOLD:
LOAD * INLINE [
SID, Date, Item
101, 1/2/2018, a01
102, 1/3/2018, a02
103, 1/4/2018, a03
104, 1/5/2018, a04
105, 1/6/2018, a05
106, 1/7/2018, a06
107, 1/8/2018, a07
101, 2/2/2018, a08
102, 2/3/2018, a01
103, 2/4/2018, a02
104, 2/5/2018, a03
105, 3/5/2018, a04
106, 3/6/2018, a05
107, 3/7/2018, a06
108, 3/8/2018, a07
108, 3/9/2018, a08
104, 5/10/2018, a01
105, 6/11/2018, a02
106, 6/12/2018, a03
107, 6/13/2018, a04
101, 7/14/2018, a05
101, 6/15/2018, a06
104, 6/16/2018, a07
105, 7/17/2018, a08
106, 6/18/2018, a01
106, 6/19/2018, a02
104, 8/20/2018, a03
105, 6/21/2018, a04
106, 9/22/2018, a05
104, 12/23/2018, a06
104, 6/24/2018, a07
101, 12/23/2018, a06
];
SOLDFINAL:
LOAD * ,
'Q' & ceil(month(Date)/3) AS QUARTER
Resident SOLD ;
DROP Table SOLD ;
Thanks you all .
Maybe like
{<SID = {"=count(DISTINCT QUARTER)=4"}>}
This working to me . Thank you sir .
Count(DISTINCT {<SID=P({<SID = {"=count(DISTINCT QUARTER)=4"}>})>} SID)
You are welcome.
But why do you use an additional p() function? Just wondering.
I having an extra additional requirement . Please help .
Need to find all sales id which have sold in any two consecutive quarters .
if x is selling in Q1,Q3 , it should not be picked but , if selling in Q1,Q2 then should be picked by expression .
Maybe
{<SID = {"=Wildmatch(Concat(DISTINCT QUARTER,','),'Q1,Q2*','*Q2,Q3*','*Q3,Q4')"}>}