2.6 Logical OR

 

Based on the following table recording customers whose order amounts rank in top 3 in each month, find whether customer RATTC ever enters in the top 3 in terms of sales.

Month Top3
1 ANTON,AROUT,BERGS
2 BLAUS,BLONP,BOLID
3 BONAP,BOTTM,BSBEV
4 CACTU,CENTC,CHOPS
5 COMMI,CONSH,DRACD
6 DUMON,EASTC,ERNSH
7 FAMIA,FISSA,FOLIG
8 FOLKO,FRANK,FRANR
9 FRANS,FURIB,GALED
10 GODOS,GOURL,GREAL
11 GROSR,HANAR,HILAA
12 HUNGC,HUNGO,ISLAT

SPL script:

A
1 =T(“TopCustomers.xlsx”)
2 =A1.(Top3.split@c().pos(“RATTC”)>0)
3 =A2.cor()

A1 Load data table.
A2 Check whether the monthly top three includes customer RATTC.
A3 Use cor() function to find whether A2’s member contains true.