Is there a way to filter information from a view and display them in the same view? - lotus-notes

two months ago i asked this Question: How do i write more complex code in Lotus Notes views.
My View now looks like this:
Year
Month
Device
Counter
Times(Minutes)
Times(Hours)
2021
January
Test 01
270
4,5
Test 02
210
3,5
Test 01
60
1
Test 01
90
1,5
February
Test 01
30
0,5
Test 02
180
3
Test 01
60
1
The Database sets a new Document every time a Device is lend out. What i want to do now is to read trough every document and combine "Times(Minutes)" and "Times(Hours)" inside an variable, and also save each device name one time.When a device name is scanned more then once, the counter will go up by one. In my Lotus script program i did this using a Multi-Dimensional Array.
I Want to do this because i want to display each Device only One Time. Then each device has the combined values inside the "Times" Columns, and a counter to show how often the Device has been lend out in the chosen month. It should look like this:
Year
Month
Device
Counter
Times(Minutes)
Times(Hours)
2021
January
Test 01
3
420
7
Test 02
1
210
3,5
Feburary
Test 01
2
90
1,5
Test 02
1
180
3

If you set the device column to be categorised, and set totals on the Times columns properties, this will give you what you want. It will have the benefit that you can also see the total times across the month for all devices before you drill down

Related

How do I create a table from the data in a larger table using Excel functions?

I have the following table in Excel:
Code
Name
Location
Value
1001
Name 01
Regional
1
1002
Name 02
Local
2
1003
Name 03
Local
3
1004
Name 04
Regional
4
1005
Name 05
Local
8
1006
Name 06
Regional
6
1007
Name 07
Regional
7
1008
Name 08
Local
8
1009
Name 09
Regional
9
1010
Name 10
Local
10
From the table above, I want to create another table that meets the following criteria:
Select only items whose Location is Local.
From the items with Local Location select only the 3 highest values.
The result I expect is the following table:
Code
Name
Location
Value
1005
Name 05
Local
8
1008
Name 08
Local
8
1010
Name 10
Local
10
I have already tried using the Excel functions IF, CHOOSE, MAX and VLOOKUP and some combinations between them, but without success.
Could someone help me create the table I want using some of the functions available in Excel?
With Microsoft-365 could use-
=TAKE(SORT(FILTER(A2:D11,C2:C11="Local"),4),-3)
If you want to include header row then use VSTACK().
=VSTACK(A1:D1,TAKE(SORT(FILTER(A2:D11,C2:C11="Local"),4),-3))

Geemap download multiple files

Does anyone know how to implement a for loop to download for example each 15 days a land cover MODIS image in 20 years? It will be so helpful for me.
For example I need in a folder get 1 image each 15 days from 2000 to 2020 .tif
How do I implement a loop for it?
Landcover_01.tif, where 01 it's the consecutive number, and this must finish in Landcover_480.tif. that means one image each 15 days from January 2000 to December 2020

Renaming a file using a conditional statement

How to rename file names using if condition?
I have many files on my computer and would like to change its names so that it would be more meaningful for me. The filenames are in the following format: cvcvcv198307.xlsx
I want to change it in such a way that
cvcvcv into Domain
1983 want to keep it
07 into 3-1 * And here is my main problem (Explanation below).
Each month (01-12) is divided into three data points. Meaning,
01(Jan) has three data points: 1,2, and 3
02(Feb) has the next three data points: 4,5, and 6
.
.
.
12(Dec) will have: 34,35, and 36
So, 01 in my original data means, first month, first data point, i.e. 1-1
02 - First month, and second data point, i.e. 1-2
03 - First month, third data point, i.e 1-3
04- second month, first data point, i.e. 2-1
05- 2-2
06- 2-3
07 - 3-1
08 - 3-2
09 - 3-3
10 - 4-1
11 - 4-2
12 - 4-3
.
.
.
35 - 12-2
36 - 12-3
And that's all.
I have tried file.rename along with sapply for my whole sets of data
(1:18,000). But i can only manage to change the file names before the last two #digits.
Expected result.
The whole file names changed from
cvcvcv198307.xlsx
cvcvcv198414.xlsx
into
Domain1983-3-1.txt
Domain1984-5-2.txt
(Yes, file name extension too!)

sumif range and criteria switching

So I have a table of number of fiscal weeks in a year, and to calculate depreciation I'm trying to sum the number of weeks in the total life of the capital investment. So the first argument is the range, the second argument pulls the year from another cell, and then adds the expected life in years of the device. The third argument is the intended sum range.
SUMIF(YearWeeks[Year],"<="&LEFT(AS$14,4)+$H20,YearWeeks[Weeks])
This works fine. Pulls in the right numbers no problem.
However, whenever I try and drag this across other cells so that it can be used throughout my spreadsheet to caculate depreciation, it immediately switches the value for year and the value for weeks and becomes:
SUMIF(YearWeeks[Weeks],"<="&LEFT(AU$14,4)+$H20,YearWeeks[Year])
I cannot figure out why it is doing this. It is probably something simple, but it is completely evading me. Any help would be greatly appreciated.
Year Weeks
2015 52
2016 53
2017 52
2018 52
2019 52
2020 52
2021 53
2022 52
2023 52
2024 52
2025 52
2026 52
2027 53
2028 52
2029 52
2030 52
Life
5
5
5
5
5
5
5
5
8
8
8
8
8
8
201504 201505 201506 201507 201508 201509 201510 201511 201512 201601 201602 201603
Instead of dragging the formula to the right, copy the cell and paste it in the cell at the right of it, etc... :
This will keep the column references unchanged (no change from YearWeeks[Weeks] to YearWeeks[Year]).
As specified on Microsoft's support website:
Moving, copying, and filling structured references
All structured references remain the same when you copy or move a formula that uses a structured reference.
When you fill a formula, fully qualified structured references can adjust the column specifiers like a series as summarized in the following table.
NB: YearWeeks[Weeks] is a structured reference, and fill is what many would call drag in this context.

Finding the difference in minutes or seconds for two timestamps in excel?

I have two columns in a excel containing value like : Mon Dec 01 09:27:04 2014.
Lets say column A and column B and each column has rows containing values in the above format. How can we find the difference between two dates?
Mon Dec 01 09:27:04 2014 - Sun Nov 30 11:08:36 2014 = 25 hrs 51 minutes
Please see this for how to do that..
A more direct answer: you can format the cell
=TEXT(B2-A2,"h:mm")
I suspect the data is text strings for which I suggest:
=VALUE(MID(A1,9,2)&"/"&MID(A1,5,3)&"/"&RIGHT(A1,4))-VALUE(MID(B1,9,2)&"/"&MID(B1,5,3)&"/"&RIGHT(B1,4))+(MID(A1,12,8)-MID(B1,12,8))
However this relies on Excel's ability to interpret the likes of Dec as the month of December which may not be the case for all language versions. If so, I suggest a lookup table and extracting the dates with DATE along these lines:
=DATE(RIGHT(A1,4),VLOOKUP(MID(A1,5,3),Table,2,0),MID(A1,9,2))
However by such calculation the difference of the timestamps given in the question is:
22 hrs 18 minutes 28 seconds
when formatted:
[hh] "hrs" mm "minutes" ss "seconds"

Resources