Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have my calender dates in the following format. I would like to generate a new column with the difference nbetween the two Date fields.
CD | PD | |
43759 | 43594 | |
43759 | 43616 | |
43759 | 43669 |
I would like the diff as a new field. My result table should look similar to the onw below.
CD | PD | Age |
43759 | 43594 | >150 |
43759 | 43616 | 100-150 |
43759 | 43669 | 50-100 |
My load Script is as follows:
LOAD
[F2 Num],
[Current Date],
If([F2 Num]-[Current Date]<=2,'<=2 Days',
If([F2 Num]-[Current Date]>=3 and [F2 Num]-[Current Date]<=10, '3-10 Days',
If([F2 Num]-[Current Date]>=11 and [F2 Num]-[Current Date]<=30, '11-30 Days',
If([F2 Num]-[Current Date]>=30 and [F2 Num]-[Current Date]<=89, '30-89 Days',
If([F2 Num]-[Current Date]>=90 and [F2 Num]-[Current Date]<180, '90-180 Days',
If([F2 Num]-[Current Date]>=180, '>180 Days'
)))))) as Age
Thanks!
But, it doesn't work as expected.
Solved via Nested IF.
Solved via Nested IF.