Match date and schedule to find employee working on a certain date - Google Spreadsheet - match

I have a table with the schedule of the employees
enter image description here
The first column contain the names of the employees, the 3 row contains the date, and the table contains the different positions they work on.
I want to extract the employee working on each particular date at different positions, "Д", "ДК", "1", "Дел1" and so on.
enter image description here
I tried playing around and I managed to get the column number based on the date in the cell next to Date. But I am not able to use the column number inside formulas to do a vertical lookup and find the row number.

Related

Fill a column with a date that satisfies an id statement in Sap Phoenix Webi

I am trying to fill in the date needed column with the date that has 1 in Match comment and Rank columns. More specifically from all the comments I only need the ones that satisfy a pattern and then I ranked those based on activity date. I need to keep the date that satisfies the last two requirements and fill the DateNeeded column with this date no matter the content of the row.
Ex. Table
Code / activity.date / rank / matchComFlag / DateNeeded
Jfkffj 03/8/22 2 1 10/8/22
Jdiffi 10/8/22 1 1 10/8/22
So i created a variable that has the activity date formated where both flags are one but this only fills the row that applys and the others are blank.
How can i fill the whole DateNeeded column with the date I need?
Thank you in advance!

Tableau Count Distinct when graphed shows chronological last date, when deduplicated, not first

I'm doing a break fix on a Tableau report visualization that shows the outcomes of clients by client id for a given year by showing a running sum of distinct count of client id or RUNNING_SUM(COUNTD([ID])). The X axis of the visualization is the initial date of contact with the client. Occasionally, due to errors in the data or weird behavior, there are clients that have two initial dates, listed as two separate data rows where the column Initial Date will have different values but they will share an ID.
Currently, the visualization shows such people with their chronological last Initial Date and I need it to dedup such that the visualization shows them as starting from the chronological first Initial Date.
I could create a calculated field for if there are two IDs with multiple non identical Initial Dates then use the first, but I'm not sure how to create a calculated field that can groupby or otherwise check multiple dates per ID.
In Python/psuedo code, it would be something like
For ID in IDS:
if len(groupby.IDS.ID)>1:
then Initial_Date = min(InitialDate)
But I have to do the transformation in Tableau
Keep everything the same, but create a calculated field named "Initial Contact Date" with the calculation:
{FIXED [ID]: MIN(InitialDate)}
Then replace the date field on the X axis (Columns) with this date field instead.
That LOD Expression loops through all rows given the ID, and returns only the min one.

Google Sheet: Pick max date out of row

Assume: in a google sheet the attendance to courses is logged with crosses.
Goal is to get the last attendance date of a person and add 6 months to it. ( course needs to be followed every six months ).
I've tried to retrieve the date of the last course in one column and add the +6months immediately and tried to have the +6 months in the second column, but I didn't succeed in both attempts.
See this link for example google sheet: https://docs.google.com/spreadsheets/d/10DG2I4VgTlOHJ5TG0qH4pJ5hJ9zsYuJCgRzEtuiTE60/edit?usp=sharing
=lookup("x",$B4:$F4,B$2:F$2)
Enter this formula in cell G4 and copy down the rows.
This formula looks for "x" (the attendance indicator) in cells in row 4 (columns B to F) - it's looking for the last instance. Then it returns the cell value from row 2 (the course date) of the relevant column.
=EDATE(G4, 6)
Enter this formula in cell H4, and copy down the rows.
This is pretty straightforward. It takes the date obtained from the lookup formula and adds 6 months.
Note that the lookup formula references column F. That's because as you create more courses you'll want the formula to automatically include them. So in cell F1, type something like "Don't use this column" - and then don't use that column!
Now when you add a new course, insert a new column to the left of the column headed "Don't use this column". This will ensure that the range in the lookup formula will expand to include the new column/course, and your latest attendance date will be updated automatically.
BTW, there's no guarantee that the date of the next course is a working day.

Tableau - YTD, MTD as columns in text table

I'm trying to find a way to create a table like the one above, but instead of having columns of months I would like to have columns of MTD, QTD, YTD for all selected measure values. I created calculated fields on the [Date] field but when I try to use that it still splits the data in to separate columns of months and quarters... I'm using two data sources and they are linked on the [Date] field. If I try to put two of my calculated fields in the columns bar it just combines them like 'MTD/YTD'. How can I get them to display as separate columns?
I know this is strange because there will be overlapping data (everything in the MTD will also be in the QTD and the YTD).
I found a way to do this. I created a calculated field on the date field and assigned 'MTD' to all records from the last month. Then I assigned 'QTD' to all records from the start of the quarter to the day before the start date of the 'MTD' records. Then I assigned 'YTD' to all records from the start of the year to the day before the start of the 'QTD' records. (this way there are no overlapping records).
After that I just did a quick table calc to make each of them a 'running total' table (across).
I created parameters for the dates so the can easily be updated.

How to extract information meeting a specific criterion from a table?

I have a table with 6 columns and 140,000 rows, and I can't figure out how to extract specific information from the table. For instance, when I try to extract all the accidents that happens on a specific date, either it tells me that the row '12/05/2015' does not exist or it doesn't let me set 'Date' as a Row Name since the dates repeat because more than one accident happens in a day, thus giving me the error that 'Duplicate row name: '01/01/2015'.
How can I pick a date and extract all of the data that corresponds to it?
P.S. Below you can see two photos, one of the table and one of the errors I get when trying to set date as a row to make everything clearer.
if I understand correctly your matter, you want to extract from the table, the rows that contain Date1, if so try this :
new_table = table(table(:,1)==Date1,:);