Auto - sorting date in microsoft Excel 2016 - excel

I'm trying in excel something very simple but the answer seems more difficult?
At work we created an excel file and from left to right we can fill in details.
For example:
Date EmployeeName Status Comments
But I want that all cases are being automatically sorted by date. And then from the date of today and future ( explain this later at second ).
So for example today is 27 march 2020.
Case1: 1 april 2020 / EmployeeName / Status(open) / commments
Case2: 2 april 2020 / Employeename / Status(closes ) / comments
Now I fill in a new date lets say 29 march 2020. This should automatically pop up above 1 April 2020. However you need to manually click on the sorting table.
Second what if there are cases from before 27 march ( today's date ) can you make them disappear to the bottom of the list? Or in another tab in excel?

I believe that the easiest solution would be to write an if(...) statement to fulfill those terms in moving the selected dates. For sorting the dates I would recommend to have the date format in dd/mm/yyyy. So it would read 27/03/2020, instead of 27 March 2020. I find the default sorting of excel to work better with the number sequence in that format when sorting (ascending and/or descending) dates.

Related

How to use excel formula to proportionately distribute data

I am working on a task where i need to automate the calculation using formula in excel.
Below is the table;
Column A shows the hierarchy - Month(June) -> Week No(9,10,11,12,13) -> Days in respective Week(Mon - Sun)
Column B is sales. and Column C is the percentage break down.
I want to modify existing percentage break down in a new column in a way so that
more weightage is assigned to Thursday, Friday and Saturday and Sunday.
take out some percentage from Mon, Tue and Wed and assign them to Thu, Fri, Sat and Sun.
New percentage should should add up to respective weeks percentage.
Below is the formula i used;
=IF(A81="Mon",C81-0.005,IF(A81="Tue",C81-0.005,IF(A81="Wed",C81-0.005,IF(A81="Thu",C81+0.003,IF(A81="Fri",C81+0.004,IF(A81="Sat",C81+0.006,C81+0.002))))))
Challenge arises when weekdays are split between 2 months. For example, if you look at week 9(Jun) - it starts from Wed while Mon and Tue are part of May.
Here is the outcome I got with current formula;
In calculated field sum of new percentage(17.99%) is not same as earlier(16.99) which is wrong.
Can you please help me create a formula which takes care this challenge and fulfil other conditions as well.
I would really appreciate your help.
Thanks.

Create list of custom non-standard date formats in excel

I have a table in excel with non-standard dates written in four general formats (first column), and would like to convert each to a standard excel date format (2nd column).
Early 2022 should convert to 01/14/2022
YE 2022 should convert to 12/01/2022
2Q 2022 should convert to 05/01/2022
2H 2023 should convert to 09/01/2023
Ideally, I would like to use the custom format table and just add these 4 rules but a formula addressing each of the 4 scenarios would also suffice.
Non-Standard Dates
Converted Dates
Early 2022
01/14/2022
YE 2022
12/01/2022
2Q 2022
05/01/2022
2H 2023
09/01/2023
Most likely, nested IF statements will be required that check for the words "Early", "YE", "2Q" and "2H" will be required, followed by amending of last 4 digits.
I've only figured out how to check for one word, but the IF statements need to be nested. =IF(A2="Early", "01/14/", "" ) works, but of course I need to replace the last portion ("") with a new IF statement to look for the next phrase ("YE") and so forth. I also need to amend the last 4 digits.
You could create a table like this
If that table is in I10:J13 and your estimated dates are in column A, this formula would return the date you want.
=DATE(MID(A1,FIND(" ",A1)+1,LEN(A1)),MONTH(VLOOKUP(LEFT(A1,FIND(" ",A1)-1),$I$10:$J$13,2,FALSE)),DAY(VLOOKUP(LEFT(A1,FIND(" ",A1)-1),$I$10:$J$13,2,FALSE)))
The DATE function takes three arguments: year, month, and day. The year is determined by finding a space and assuming everything after the space is the year. The month and day argument find the date in the lookup table and use MONTH() and DAY() to extract those portions. It doesn't matter what year your dates in the lookup table have because this uses the year from the estimated date.

PowerBI Desktop: Cumulative of measures from the start of January to Selected Filtered date

I am looking for a way to get a cumulative count using powerBI dax formulas.
I currently have this measure:
[Tasks opened] = distinctcount(id number of tasks that are open)
When I select the filter month (May 2021), it only shows me the opened tasks in May 2021.
Example - Tasks Opened:
>Jan 21 - 5
>Feb 21 - 6
>Mar 21 - 8
>Apr 21 - 2
>May 21 - 7
>Total = 28
When I select the filter for May 21, I want the measure to show that it is 28 instead of 7, and if I select April 21, I want the measure to show 21.
Help is greatly appreciated! Thank you :)
Elaboration:
Basically I want a method where I will be able to filter the tasks opened based on the date selected on the filter.
When the filter month is May, I want to distinct count the number of incidents that has been open for more than 90 days as of 31 May.
It should change accordingly when the filter month is April, so it should distinct count incidents that has been open for more than 90 days as of 30 April.
It should include all the open incidents (whether it is created in Jan/Feb even though the filtered date is April etc).
I figured it should be like if created date is before filter date, resolution date is after filter date and the incident has been open for more than 90 days, that data should be taken into counter.
--> The issue arise where I cant seem to get the right date for the filter date. Currently I used a measure, but the End of Filtered Date seems to only be the last day of the month (i.e. if filtered month is may, the filtered date will be 31 May 2021).
Open incidents = IF(AND(incident_sla[Created]<=[End of Filtered Month],incident_sla[Resolved]>=[End of Filtered Month]),DATEDIFF(incident_sla[Created date],[End of Filtered Month],DAY),0)
The sample excel file can be found here: https://docs.google.com/spreadsheets/d/1wMLrvfAD1gUUIxljjBgcugJsG4o-w4nE/edit#gid=605277454
P.S. Sorry for the bad formatting, I'm not very familiar with using stack overflow.

Excel - count a specific value based on a part of another cell

I thought this would be a no brainer. But I really need help to solve it.
I have a row of dates: 10 july 2020, 11 july 2020 and so on (Swedish excel).
Below each date are strings for example "FP". I wish to achieve a counter for each "FP" that is below a specific month of a year, such as july 2020.
The way I approached this was with
=COUNTIFS(G1:UG1;"*july 2020";G2:UG2;"FP")
However the * doesn't do what I want it to. Is there another way to do this?
Please help! :)
The dates are true dates and as such the july 2020 is just a format of a number and not actually there.
Instead BookEnd the date:
=COUNTIFS(G1:UG1;">="&DATE(2020;7;1);G1:UG1;"<"&DATE(2020;8;1);G2:UG2;"FP")

How to exclude the February 29 - Leap Year in a Date column using Cognos 10 Report Studio?

How do I exclude the February 29 - Leap Year in a Date column in Cognos 10 Report Studio?
This is the column that I'm using for my date prompt
Below is the prompt that I applied on the date column
Depicted below is the details and properties of the date prompt that I will use to filter my report using the date prompt.
So all attributes and measures in the report are filtered using the start date and end date of the expiration date column I used on the report.
How do I avoid the February 29th to add up in my calculated columns (measures)? I want to get all calculation from January 1 to Dec 31 without february 29 that happens every four years? The February 29 data may or may not include a large amount but it has a ripple effect at the year end calculation. That's why I want to exclude Feb 29 included in the computation.
Here's a filter expression that will exclude "leap days":
not (extract(month,[Policy Expiration Date]) = 2 and extract(day,[Policy Expiration Date]) = 29)
Kindly try this.
([Policy Expiration Date] between ?Expiration Start Date? and ?Expiration End Date?)
AND
to_char([Policy Expiration Date],'mmdd') <> '0229'

Resources