Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have a table
| Appid | AppName | Start | End |
|---|---|---|---|
| 1 | x | 2011 | 2016 |
| 2 | y | 2015 | 2018 |
first i want to generate 2011 to 2018 and when i select 2012 appname 'X' should be selected and when i select 2015 both 'X' and 'Y' (Appname) should be selected.
please help me
thank you
May be you can load your table like
Tab1:
LOAD * INLINE [
Appid, AppName, Start, End
1, x, 2011, 2016
2, y, 2015, 2018
];
New:
LOAD
Appid,
AppName,
Start,
End,
Start + (IterNo() - 1) as NewYear
Resident Tab1
While Start + (IterNo() - 1) <= End;
DROP Table Tab1;
Hi,
Try This:
Old_Table:
LOAD *
FROM Table;
New_Table:
LOAD Appid,
AppName
Start + (IterNo() - 1) as Year
Resident Old_Table
While Start + (IterNo() - 1) < End;
Drop Table Old_Table;
BR
Ariel
You can use interval match function but first you have to create a calendar that holds year field and then you make a link between Start and End with Year
Check enclosed file...
May be you can load your table like
Tab1:
LOAD * INLINE [
Appid, AppName, Start, End
1, x, 2011, 2016
2, y, 2015, 2018
];
New:
LOAD
Appid,
AppName,
Start,
End,
Start + (IterNo() - 1) as NewYear
Resident Tab1
While Start + (IterNo() - 1) <= End;
DROP Table Tab1;
hi thank you for the reply.
year 2018 is not displaying and when i select 2015 it is giving app id 1 and 2 but when i select 2016 app id 2 only active.
if i select either 2015 or 2016 or both then i should get both the apps.
thank you