Google sheets: how to return a value of array with double conditional? - google-sheets-formula

I have created a PM schedule (dates and type of service, 1st tab) and I want to know what formula delivers/displays the summary of units that require service (2nd tab). The typed date sets an entire week that should match with the second row of 1st tab, then search down all services along the column and if it encounters a label (type of service) find the freight truck for service. I have tried with:
=VLOOKUP(E1,'Schedule 2022'!A2:GC,1,false)
=index('Schedule 2022'!D2:GC,match(A4,'Schedule 2022'!D2:GC2))
combinations with filter and importrange
File of preventive schedule for freigh trucks
Thanks in advance for your valuable support.

Related

How can I filter a table for the field values on the last(highest) date in a custom four week period, using DAX in Power BI?

I created a calculated table based on start and end dates to check which manager is responsible for a product per date.
Result:
The financial department uses a four week period to report. So 13 periods per year.
(not usable in a date table?)
Product number 8098 gets a different manager on the 23rd of januari this year.
So at the start manager C5104 is responsible and at the end of period one (202301) C5107 is responsible.
To get one responsible manager per period I'd like to filter the table in such a fashion that I get the numbers from the last date in a period. After filtering I don't need the [date] field anymore.
I hope I'm just missing something basic like the 'ELLEXCEPT' But I'm lost...
DISTINCT gives:
One row too many. I'd like to lose the row: 8098, C5104, 202301.
To keep only rows showing the manager per product at the end of a period.

Google sheets Query, How to use query to select a value in rows based on header dates

I have sheet with two tabs and named a ranged where I'm trying to match and select a value in the budget tab based values from the month tab using query. The challenge I'm running into is how to use the dates in the header row of the budget tab in the Where of the query.
Find the value from named range Budget WHERE Category in Month tab matches Category in Budget AND date from Month tab matches date from budget tab, else value in Budget tab column lookup.
I think the sample sheets does a better job of showing this. Thanks in advance for any help.
https://docs.google.com/spreadsheets/d/1heN3I1tWiqBJ0LdHRK-26Koafk_8EudqfMy0cFWxFjI/edit?usp=sharing
I think in this case and the sheet layout it is better to use VLOOKUPs.
Just use this arrayformula across all months
=ARRAYFORMULA(if($H$16:$H="","",if(VLOOKUP($H$16:$H,budget,ifna(match(I$15,Budget!$E$1:$K$1,0),COLUMNS(budget)),false)="", VLOOKUP($H16:$H,budget,columns(budget),false), VLOOKUP($H$16:$H,budget,ifna(match(I$15,Budget!$E$1:$K$1,0),COLUMNS(budget)),false))))
Please note that I expanded the budget named range to cover the entire range, including Category and Lookup columns.

Amazon Quicksight - Dynamic filter latest week by default

I think the question is fairly simple. I would like to have a dynamic filter on Quicksight. I have the column week which is a number (3, 4, 5 and 6) for example. The data is refreshed every week.
We want to show only the latest week by default (out of weeks 3, 4, 5 and 6, I want to filter by default on 6), but then the users can select if they want to see more weeks.
The week after, the default filter would be 7, and so on.
Is there a way to tell the filter to automatically filter by rule of MAX(week) or something like that?
It would be very helpful. I have other alternatives but they are not that great.
I would choose a date field that I understand that must exist in your data and then create a dynamic filter on that date field.
You create filters on date fields by selecting the filter conditions and date values that you want to use. There are three filter types for dates:
For your case, you will have to use
Relative – A series of date/time elements based on the current date. You can filter records based on the current date and your selected unit of measure (UOM). Date filter units include years, quarters, months, weeks, days, hours, and minutes.
Use the following procedure to create a relative filter for a date field.
On the toolbar at the left, choose Filter.
In the Filters pane that opens at left, choose the plus icon (+), and then choose a date field to filter on.
A new filter is added to the Filters pane.
In the Filters pane, choose the new filter to expand it.
For Filter type, choose Relative dates.
Choose a unit of time (week for your case).
Choose how you want the filter to relate to the time frame. For example, if you choose to report on weeks, your options are previous week, this week, week to date, last N weeks, and next N weeks.
If you choose Last n UOM, specify a number for your range—for example, last 2 weeks, or last 1 week.
Second solution.
Add Filter
Choose week
Type Top and Bottom Filter
Show Top write 1
By week ( use max aggregation)
Pasting an image from an analysis that I do the same thing for integer column year

Dynamics CRM Marketing list dynamic date condition

I need to build a marketing list with date condition like so:
Month("End Date") = "This month" + 4
Basically, find records with End Date in 4 month
For example, if I pull the list on 6/12/17 - I will get all records with end date in Oct: 10/1/17, 10/2/17, etc
The closest I found is "Next X Month" but it also includes records within 3 month.
As an alternative - I'm exploring a path of creating workflow to update the "query" value of the marketing list record. Unfortunately, it's not possible to add Query field to the default form... this is getting very complex for a simple requirement.
Any ideas would be appreciated!
In the marketing list manage members, use "Add using Advanced Find" option and add all records with "Next 4 Month". Then use "Remove using Advanced Find" option and remove all records with "Next 3 Months".
Basically we can have a batch job every night, which will calculate the desired date or month filter for each contact record. Then fetchxml query for dynamic Marketing list can target this field.
Similarly rollup field can also be tried in contact.

Get first and last entry given a timespan

I am using Kibana to log actions performed by the users of my web interface.
I would like to create a visualisation that does the following:
For each of my users (I have a field for that in my Elastic entries)
Display the first and last entry datetime
Maybe should I make two visualisations, on for first, one for last, as I don't know if it possible to do it on one single Visual.
Thanks in advance
Okay, I found the answer, in the case of a Data Table visualization, I added two metrics:
The min and max of the datetime field I use as the timestamp.
Changing the timespan of your visualization will give you the first and last entry datetimes.

Resources