I want to know if my value is included in an interval consisting of the previous row and the next row. How to do it in Talend?
I tried a tMemorizeRow function where I save 3 lines each time, but encountered a java.lang.NullPointerException exception as when I am on the first line it does not know the next row I saved.
What am I missing?
You can try this : add a column "sequence" with value as Numeric.sequence("s1",1,1)to your data : this way you'll know this exact order between rows in your flow (you can do it in a tMap). Redirect the tMap to a tHashOutput component (if you can't find in the palette, add it through Project Parameters>Designer>Palette>Technique , this component is hidden by default).
Then you'll need an other subjob, with 3 tHashInput : one for your main flow, and the two others as lookup : then you'll be able to join rows with previous and following one , thanks to your 'sequence' field.
Then in tMap_2 you'll be able to compare values from mainFlow with Previous and Next flows.
Related
I have a table with names on the left and corresponding work schedules to the right. I've created a separate table with some of those same names and want it to automatically fill in the corresponding work schedule for that person. Seemed simple but I'm very stuck. My level of experience with Google Sheets is what is stopping me from solving this.
Example Tables:
In the attached picture the table on the top is the original (hardcoded) data. The table on the bottom is where I want the schedule data to be automatically produced based on the name on the left. The fields with #N/A and #ERROR! are both failed formulas I tried. #N/A should have returned B7:G7. #ERROR! should have returned B4:G4.
I tried the 'LOOKUP' function with ARRAYFORMULA(INDEX) hoping to have it look up the value in the column and input the work schedule data that corresponds.
=LOOKUP("Clair",A1:A9,ARRAYFORMULA(INDEX(B1:G9)))
yielded an #N/A.
Started trying to use =If(REGEXMATCH(A13:A21,"Clair"),... ...) but the '... ...' shows where my intellectual limits are at the moment. I couldn't finish it because I think it's the wrong formula to use.
Something like this maybe?
Remove everthing in B13:G17, and put this formula in B13
=BYROW(A13:A17,LAMBDA(NAME,XLOOKUP(NAME,A1:A9,B1:G9,"NOT FOUND")))
BYROW() work with an array row by row, the given data A13:A17 has only 1 column, which is the name of staff as lookup value.
Details: https://support.google.com/docs/answer/12570930?hl=en
XLOOKUP() scan an array for a key value (lookup value), and return another array with corresponding row or col index.
Details: https://support.google.com/docs/answer/12405947?hl=en
try:
=INDEX(IFNA(VLOOKUP(A13:A17; A1:G10; SEQUENCE(1; 6; 2); )))
My goal is to make it so that the spreadsheet checks to see if the respective Web ID in Column B has an Active LOA as determined in Column I. An Active LOA being defined as one with an end date that has NOT yet passed.
I've gotten the formulas to work with the first entry. But if that first entry's date has passed (marked as Expired) and the entry after that one hasn't passed (marked as Active LOA) then the formula breaks down. It's as if the formula works only once.
The formula that checks the respective Web ID's in Column B of the "Roster" tab against the Web ID in the "ScD LOA Responses" tab is in cell F9 of the "Roster" tab.
The formula that determines whether or not the date has passed/whether the person is still on LOA is found in column I of the respective row.
You are getting wrong result on second row because you have lock the range on first row, change it as following should work properly:
=IF($F3:$F<TODAY(),"Expired","Active LOA")
You may try arrayformula also by only enter formula on F3:
=arrayformula(if($F3:$F="","",IF($F3:$F<today(),"expired","active")))
The issue for Roaster is not syn with the form submission is because Vlookup is limited to return first occurence unless you make so adjustment, here I will give a simple solution to always return the latest result for syn:
=iferror(index(FILTER('SC LOA Response'!C$3:$I,'SC LOA Response'!C$3:C=B6),COUNTIF('SC LOA Response'!C$3:C,B6),7),"")
Since your roster is fixed number, you can copy the formula on every row, hope it solve your issue :)
In the below linked g sheet, i am trying to reference the datasource on the left.
Whereby there is a list of vehicle registration numbers on the left and a date range across the top withe the driver name used as the value.
Table 1 refers to where i am trying to then view which vehicle each driver used on each day. (I have input the results to help with the explaination.
My attempts started with this in O6 =INDEX(B6:K15,MATCH(M6,A4:A15,1),MATCH(O3,A5:K5,1))
Does anyone have any suggestions? Please?
Russ
View Google sheet
This should work:
=INDEX($A$6:$A$15,MATCH($M6,OFFSET($A$6:$A$15,0,MATCH(O$3,$B$5:$K$5,0)),0))
Explanation
The MATCH(O$3,$B$5:$K$5,0) part is figuring out what column the date is in and returning the index number in relation to the table's range.
That is contained inside OFFSET($A$6:$A$15,0,MATCH(O$3,$B$5:$K$5,0)) which is getting a reference to the column of driver names on that date. It does this by taking the table's first column, and offsetting it by the index we found in step 1.
Then that is contained in MATCH($M6,OFFSET($A$6:$A$15,0,MATCH(O$3,$B$5:$K$5,0)). This is using that column reference from step 2, looking for the row containing the driver name we're interested in, and returning that row's index.
Finally you have that complete formula. It's a simple Index/Match which takes the range in the first column which contains the list of vehicles, and returns the value at the row index we found in step 3.
I have an table in an MS Excel 2010. The table has two columns. The first column is a name of a person (Col A), the second column is the marks that the person secured in an exam (Col B).
I am applying conditional formatting. If I choose the following wizard
Home > Conditional Formatting > Format all cells based on their values
I can color the Col B on a 3-color scale. This is exactly what I want. However, I want it for the entire row and not only the cell in Col B. I want the name also to be formatted in the same color as the marks.
Anyone knows how to do this?
I have already looked around a bit. The following came close to did not solve the particular problem that I am trying to.
http://www.howtogeek.com/howto/45670/how-to-highlight-a-row-in-excel-using-conditional-formatting/
Conditional Formatting Rows Based on Date
You're probably going to have to use VBA code for this.
Right click the worksheet label and select 'View Code'
Inside the code window, paste in the following code:
Sub RunMe()
Dim xRng As Range, xCell As Range
With Me
Set xRng = .Range(.Cells(2, 2), .Cells(.Rows.Count, 2).End(xlUp))
' Change the first '2' above to reflect the starting row of your data
For Each xCell In xRng
xCell.Offset(0, -1).Interior.Color = xCell.DisplayFormat.Interior.Color
Next xCell
End With
End Sub
Now every time you run the macro (Alt-F8, select macro), column A will be formatted with the conditional formatting assigned to column B.
If you want this process to be automatic, change:
Sub RunMe()
to something like:
Private Sub Worksheet_Activate()
' This will run the macro whenever the worksheet is selected
or you could assign the code to a keyboard shortcut or a command button etc.
If you would like the code to run every time the file is opened, saved closed etc, add the code instead to the ThisWorkbook code window (although you'd have to alter the code slightly as 'Me' is referencing the particular worksheet in which the code is placed).
I have Sheet 1 with categorized data. The 'Status' column is what I want to selectively use to pull rows from Sheet 1 -> Sheet 2. I'm trying to find the most straightforward way to pull over just Rows that have the status as 'Accept'. I was able to do this in a less concise, 2-step process of:
Column 1: Pull over Just name column of other sheet with criteria satisfied
=sort(filter('Data'!C2:C, {Status Cirteria}))
*This was only needed once, and the rest of the column was populated automatically via =CONTINUE().
Column 2: pull over the remaining data (rest of row) corresponding to that name
=filter(Data!$A$3:T, {NameCell}=RawData!$F$3:F)
*This was needed for every row.
I'd like to complete this process with just two functions that continue if possible, so I can eliminate user error associated with forcing the user to manually drag the second formula down for new entries.
Any Ideas?
Have you tried using query instead of filter?
Assuming the status is at column F:
=query(Data!A3:T;"select * where F = 'Accept'";1)