Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a simple data table as shown below:
F11 | F21 | Candidate 1 | Candidate 2 | Candidate 3 | Candidate 4 | Candidate 5 | Candidate 6 | Candidate 7 | Candidate 8 | ||
---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | |||
|
| YES | YES | NO | YES | YES | |||||
|
| L2 | L1 | L1 | L1 | ||||||
|
| 5 | 4 | 6 | 7 | 8 | |||||
|
| YES | YES | YES | YES | YES | |||||
|
| YES | NO | YES | YES | YES |
I'm trying to build flags based on some specific criteria:
1. Flag1 is based on the field 'CV Submitted by Bidder'. If Total Number of CVs submitted by bidder <=5, Fail,Pass.
2. Flag 2 is based on the field 'Is Employee's status in Bidder's Company currently Permanent?'. IF no. of 'YES' responses to this question <5, Fail, Pass.
3. Flag 3 is based on the field Select Secondary Qualification/Education Level . If <5 blank responses, fail, pass.
4. Flag 4 is based on the field Total Working Experience. If 5 Candidates have less than 5 years of experience, then FAIL; less than 7 years of experience, OKAY,else Pass.
5. Flag 5 is based on the field Have you submitted documents. If < 5 responses are "YES", then Fail, else Pass.
6. Flag 6 is based on the field Have you submitted - Candidate’s Education Certificate. If < 5 responses are "YES", then Fail,else Pass.
I have run out of ideas on how I can transform the table to convenience and build all of these flags in the script itself. Please help me with the transformation and the logics for the flags as above. Any help is much much appreciated! Thanks in advance!
Still gives the same error. Is it because the field has both text and numbers?
Can you share the complete script you are running?
try declaring the field as Dual
T2:
LOAD A as F11,
B as F21,
C as [Candidate 1],
D as [Candidate 2],
E as [Candidate 3],
F as [Candidate 4],
G as [Candidate 5],
H as [Candidate 6],
I as [Candidate 7],
J as [Candidate 8]
FROM
[*Book1.xlsx]
(ooxml, no labels, header is 3 lines, table is [APPENDIX V (G)]);
T2_1:
CrossTable(Criteria,Responses,2)
Load
F11 as F12,
F21 as F22,
[ Candidate 1],
[Candidate 2],
[Candidate 3],
[Candidate 4],
[Candidate 5],
[Candidate 6],
[Candidate 7],
[Candidate 8]
Resident T2;
T2_2:
Load *,
If(Sum(If(F22 = 'CV Submitted by Bidder', Responses)) <= 5, 'Fail', 'Pass') as Flag15
Resident T2_1;
Drop Table T2_1;
May be try this
T2:
LOAD A as F11,
B as F21,
C as [Candidate 1],
D as [Candidate 2],
E as [Candidate 3],
F as [Candidate 4],
G as [Candidate 5],
H as [Candidate 6],
I as [Candidate 7],
J as [Candidate 8]
FROM
[*Book1.xlsx]
(ooxml, no labels, header is 3 lines, table is [APPENDIX V (G)]);
T2_1:
CrossTable(Criteria, Responses,2)
Load
F11 as F12,
F21 as F22,
[ Candidate 1],
[Candidate 2],
[Candidate 3],
[Candidate 4],
[Candidate 5],
[Candidate 6],
[Candidate 7],
[Candidate 8]
Resident T2;
DROP Table T2;
Left Join (T2_1)
Load Criteria,
If(Sum(If(F22 = 'CV Submitted by Bidder', Responses)) <= 5, 'Fail', 'Pass') as Flag15
Resident T2_1
Group By Criteria;
I'm not sure if that is what is required Sunny. Basically, Flag15 is defined as 'Pass' if total number of 'CV Submitted by Bidder' is >5 counting from Candidates 1 through Candidate 8 else Fail.
May be this?
T2:
LOAD A as F11,
B as F21,
C as [Candidate 1],
D as [Candidate 2],
E as [Candidate 3],
F as [Candidate 4],
G as [Candidate 5],
H as [Candidate 6],
I as [Candidate 7],
J as [Candidate 8]
FROM
[*Book1.xlsx]
(ooxml, no labels, header is 3 lines, table is [APPENDIX V (G)]);
T2_1:
CrossTable(Criteria, Responses,2)
Load
F11 as F12,
F21 as F22,
[ Candidate 1],
[Candidate 2],
[Candidate 3],
[Candidate 4],
[Candidate 5],
[Candidate 6],
[Candidate 7],
[Candidate 8]
Resident T2;
DROP Table T2;
Left Join (T2_1)
Load If(Sum(If(F22 = 'CV Submitted by Bidder', Responses)) <= 5, 'Fail', 'Pass') as Flag15
Resident T2_1;
Yes. This was the way to go as I just found out myself! Thanks for your time Sunny! Really really appreciate it!
No problem
Please close the thread by marking correct and helpful responses.
Best,
Sunny