Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All.
I have a many files from one directory.
I need sum values from last file and all other files.
How i can do it?
For example. I have 3 tables:
Table 1 (create 01-01-2014) | Table 2 (create 02-01-2014) | Table 3 (create 03-01-2014) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
In the end I need next datas:
Table | Summ | My comment |
---|---|---|
All | 210 | Sum by Name 1 - 6 |
Earler | 100 | Sum by Name 1, 2, 3 and 4 |
Last | 110 | Sum by Name 5 and 6 |
Thanks.
Load all the data into one table and make sure you add the data into a field in that table too.
You can find some code to loop through files here: loop through to load all files from a folder and its subfolders?
If necessary you can use the FileTime() function to retrieve the modification date of the file.
Once you have you can create a table with expressions to get the correct sums:
All: sum(Quantity)
Last: sum({<FileTime={'$(=max(FileTime))'}>} Quantity)
Earlier: All - Last
Load all the data into one table and make sure you add the data into a field in that table too.
You can find some code to loop through files here: loop through to load all files from a folder and its subfolders?
If necessary you can use the FileTime() function to retrieve the modification date of the file.
Once you have you can create a table with expressions to get the correct sums:
All: sum(Quantity)
Last: sum({<FileTime={'$(=max(FileTime))'}>} Quantity)
Earlier: All - Last
Gysbert, thank you! It's work