Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So I'm trying to create a new field based off a field I already have that measures days plane tickets were booked in advance. Said days field looks like this:
|
3 |
|
7 |
|
0 |
|
0 |
|
0 |
|
0 |
|
1 |
|
1 |
|
0 |
|
2 |
I want to make a field that classifies these as "0-4 days" or "5+ days". Can you help me?
You can try this for backend script;
Data:
Load *,
if(Days >= 0 and Days <= 4, '0-4 days','5+ days') as category
;
Load * Inline [
Days
3
7
0
0
0
0
1
1
0
2
];
Output:
Is this what you are looking for?
You can try this for backend script;
Data:
Load *,
if(Days >= 0 and Days <= 4, '0-4 days','5+ days') as category
;
Load * Inline [
Days
3
7
0
0
0
0
1
1
0
2
];
Output:
Is this what you are looking for?
Great! Thanks.