SharePoint Online - Calculated column to find earliest date of another column - sharepoint-online

I have a list that contains tasks for a project. Each task has a start date which is independent of all the other tasks' start dates. For example:
Task
Start Date
1
2022-08-01
2
2022-08-03
3
2022-08-10
I would like to create a calculated column that finds the earliest start date and applies it to all items in the list. For example:
Task
Start Date
Earliest Date
1
2022-08-01
2022-08-01
2
2022-08-03
2022-08-01
3
2022-08-10
2022-08-01
However, when I create the calculated column as =MIN([StartDate]), it only references the dates within each item and not the dates from all items in the list (i.e., column). Giving me this:
Task
Start Date
Earliest Date
1
2022-08-01
2022-08-01
2
2022-08-03
2022-08-03
3
2022-08-10
2022-08-10
Do I need to use different syntax when creating a calculated column to force SharePoint to look across items when doing the calculation?
Thanks.

This is a known limitation of SharePoint calculated columns.
Calculated column formula can only reference the column values from same list item/row. It cannot access column values (data) from other list items/rows.

Related

Calculating days between two oldest dates on varying amount of date values

I'm trying to calculate a number of days between two oldest days. The task would be easy, if it were only two dates, however - there could be 3 or 4 dates - I need to take the oldest and the earliest and just subtract them, however the challenge is varying amount of dates per ID.
I've got a pivot table where on the A column I have the ID and on the B column I have multiple rows of sorted dates for that ID. Example of Table (also adding a picture for reference):
Column A
Column B
ID 1
Date 1
Date 2
ID 2
Date 3
Date 4
Date 5
ID 3
Date 6
Date 7
Example: For ID 1 (in Column A) - to get the result that I need - I would do Date 2 - Date 1
Example: for ID 2 (in Column A) - to get the result that I need - I would have to do Date 5 - Date 3
Is there an easy way to do it in Excel? Or would I have to result to a programming language - putting IDs into Objects and storing all the dates into arrays and then manipulating it in arrays?
I've tried finding suitable functions in Excel and reading more about Pivot tables, but with no luck. Maybe someone can put in me on the right path.
If you are using Excel 365 you can use the following formulas.
If not, you have to replace the formula in D4 with a unique list of your IDs. And you will have to drag down the formulas for column E and F.
Using MINIFS/MAXIFS then retrieves the min/max dates of a single ID
"=(MAX(FILTER(B:B;A:A=A1)))-MIN(FILTER(B:B;A:A=A1))"
This solution works with Excel 365.
Filter function acts as a VLOOKUP function, but it can actually store multiple values and you can find Minimum and Maximum values for each ID and subtract them .

Count on how many tickets are logged this month - per series

I have two columns - one with ID's in and one with the date it was created on.
Is there a way which will do a count on how many ID's were created in the current month - and will automatically reset itself when it falls into the next month.
E.g.
ID Creation Date
8.88 01/01/2019
8.89 01/01/2019
8.9 01/07/2019
1.1 01/07/2019
1.2 01/06/2019
1.3 01/05/2019
1.4 01/04/2019
5 01/07/2019
5.1 01/07/2019
5.2 01/06/2019
5.3 01/06/2019
If i use the current month (July 2019) - i would hope to see - ID which begin with 8, there was 1 created this month. ID'w which begin with 1 - 1 was created this month & ID's which begin with 5 - there were two created this month
Thank you
Assuming your data starts in A1 it would come down to:
"Is there a way which will do a count on how many ID's were created in the current month - and will automatically reset itself when it falls into the next month."
To get the total of entered ID's:
=SUMPRODUCT(--(MONTH(B2:B12)=MONTH(TODAY())))
You could also use a COUNTIFS formula like so:
=COUNTIFS(B2:B12,">="&EOMONTH(TODAY(),-1)+1,B2:B12,"<="&EOMONTH(TODAY(),0))
"Is there a way that it can be broken down into each ID. E,g, Taking the LEFT 1st number - e.g. Just reference against the 5 series numbers and returning the results."
To get the total of unique series numbers entered:
=SUM(--(FREQUENCY(IF(MONTH(B2:B12)=MONTH(TODAY()),MATCH(LEFT(A2:A12,1),LEFT(A2:A12,1),0)),ROW(A2:A12)-1)>0))
Entered as array formula through CtrlShiftEnter
If the dates are true dates then you can make a pivot table.
First we need to split the ID data on the "dot".
Insert a new column between ID and creation date.
Select the ID column and click Data -> text to columns.
Split the column on ..
The new column (B) needs to have a header. Just write whatever you want as header.
Go to insert -> pivot table
Then just drag creation date to Rows field (the months will be added automatically) then and ID to also to Rows field.
Then drag ID to the values field.
EDIT. I see now that my image shows the dates also. You can remove that from the rows field by just dragging it up again to the list.

Excel - Create a pivot table by week that displays the weeks without dates with a null or 0 value

to keep it simple I have a spreadsheet that has dates that I need to create a pivot table with, grouped by week. The challenge is that I need to see the weeks that do not have dates. In the end I want to have a chart so there may be a way just through the chart.
Example Data:
1/3/2017 - 137
1/18/2017 - 10
1/19/2017 - 20
1/30/2017 - 45
1/31/2017 - 15
I would need something that showed the week. I will use the week number and sum the second column for the example above example.
Week - Data Total
1 - 137
2 - 0
3 - 30
4 - 0
5 - 60
I am not picky whether it is using MDX a formula, group, chart etc. The only thing that I do not want to do is add a date from all the missing weeks into the data.
If you create the Pivot Table using those two columns (dates as rows and numbers as values), then rightclick on the rows and select Group -> Days -> Number of Days 7, it'll divide all your dates into weeks and sum the values of each day. Want the weeknumbers? Add a column to the left of your Pivot Table and enter this formula:
=WEEKNUM(LEFT(B64;FIND(" ";B64 ) - 1 );2)
Substitute B64 for the cell of the Pivot Table containing the week range.
Here is what you can try:
The formula based on my setup:
=SUMPRODUCT(--(WEEKNUM($A$2:$A$6+0,2)=E2),$B$2:$B$6)
Try and let me know if this works or not.

Excel Pivot table count between

I have a problem creating a pivot table/chart with between date function.
I would like to know the total count of projects that are active between two dates. A Chart with on the x-axis week 1 - week 52 is what i'm trying to create.
Example Chart
20
10
5
0
week 1 week 2 week 3 .....
My columns:
Project ID | START WEEK NUMBER| END WEEK NUMBER
What have I already done?
Adding helper columns 1 till 52 with the following function:
=IF(AH$1=MEDIAN($AB10;$AD10);1;IF(AH$1=$AB10;1;IF(AH$1=$AD10;1;"")))
This will show a 1 when the column week header is equal or between date start week and end week. But with this I am still not able to create a chart with the weeks on the x-axis and the total count of that week.
Make a new sheet and in Column A put your weeks 1-52 down. In column B use this formula:
=COUNTIFS(Sheet6!$B$2:$B$18,"<="&A2,Sheet6!$C$2:$C$18,">="&A2)
Sheet6! Needs to be replaced with the name of your Sheet, e.g. Projects!
Column B range needs to be the entire range of your start week
Column C range needs to be the entire range of your end week
B and C dimensions need to match.
If you need to use a pivot table, try rearranging your source data as shown:

Indexing a sum of values by row from multiple columns

I'm struggling with this one...
http://postimg.org/image/50itqsz2x/
I've added a link to a screenshot, because I can't post images here...
In row 2 i have week numbers up to week 9 in this example. Row 1 has a formula that determines to which month a week belongs. In this example, week 5 is in month 1 and week 6 in month 2.
I need to sum the values by weeks and categories and show them in another table as monthly values as given in the example.
In B10 use this standard formula.
=SUMIFS(INDEX($B$3:$J$7,MATCH($A10,$A$3:$A$7, 0),),$B$1:$J$1,B$9)

Resources