Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I would like to get a value from a max FileTime/Date, then save this value into a LET variable which I will use as column for another table.
Example
Load * Inline [
Week, FileTime
Week 1, 1-1-2019
Week 2, 2-1-2019
Week 3, 3-1-2019
]
The max value for this table should be Week 3 as the max FileTime(Date) is 3-1-2019..
I want then to save Week 3 into a LET variable...
Load
$('Here variable '),
Testfield
Resident Test.
Do you guys have any idea?
Thanks in advance!
Table1:
Load Week, Date(Date#(FileTime,'D-M-YYYY'),'D-M-YYYY') as FileTime Inline [
Week, FileTime
Week 1, 1-1-2019
Week 2, 2-1-2019
Week 3, 3-1-2019
];
Table2:
LOAD FirstSortedValue(Week, -FileTime) as MaxWeek RESIDENT Table1;
LET vMaxWeek = Peek('MaxWeek',0,'Table2');
Table1:
Load Week, Date(Date#(FileTime,'D-M-YYYY'),'D-M-YYYY') as FileTime Inline [
Week, FileTime
Week 1, 1-1-2019
Week 2, 2-1-2019
Week 3, 3-1-2019
];
Table2:
LOAD FirstSortedValue(Week, -FileTime) as MaxWeek RESIDENT Table1;
LET vMaxWeek = Peek('MaxWeek',0,'Table2');