Good day folks! Can you please help me with the following excel problem (Please see below)
July Aug Sep Oct Nov Dec
Total Assets (USD'K) 32 36 38 31
Current Month : (Drop-Down list for all months)
Monthly Change in Total Assets = Current Month - Previous Month
So, here is the situation:
Each month I need to new add statistics to my worksheet. For example, when new data for Total Assets in November arrives, I need to insert it above under the heading "Nov", etc.
After inserting new data, I need to select from the drop-down list current month (for example, "Nov").
Afterwards, "Monthly Change in Total Assets" needs to be calculated automatically. For instance, "Total Assets in November - Total Assets in October".
I assume that, I need to use conditional calculation functions. But it did not work the way I expected.
Can you please help, me. Thank you in advance for your kind assistance.
Sincerely,
Considering the layout of the data is similar to as shown in the image, try this...
In B5
=IF(COUNT(B2:G2)=0,"",IF(COUNT(B2:G2)=1,B2,INDEX(B2:G2,MATCH(B4,B1:G1,0))-INDEX(B2:G2,MATCH(B4,B1:G1,0)-1)))
Related
Hi All and thank you in advance for any help.
I have several projects that start and finish in different years and want to spread the contract value proportionately over each year. For example a project might start on 1 July 2020 and end 30 June 2022 with a value of $20 million. So how would I automatically populate a value for each of these years, this example would have $5m in 2020, $10m in 2021 and $5m in 2022. The issue is I have about 100 projects that have started since 2013 and some are not due to finish until 2024 so some degree of auomation will help me. I have set up a spread sheet as follows
Excel spreadsheet
Hope this makes sense and any help will be much appreciated.
Good Day,
Try the following formula in the "Contract Days per Year":
=MAX(0,MIN(DATE(E$1,12,31),$B3)-MAX(DATE(E$1,1,1),$A3)+1)
Then you will just multiply the result in the "Contract Value by Year"
for 2019 year, copy the values under 2018 and paste it under 2019
hope it helped
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.
I inherited a worksheet that has a number of formulas (see below). The formula is trying to pull the rate from the previous month but once the month changes the amount is 0, so the current month = 0. Surely there must be a better way to write this formula but I'm stuck. Any suggestions would be greatly appreciated. Thanks for your help.
Jan 500
Feb =IF(MONTH(TODAY())=2,x7,"0")
Mar =IF(MONTH(TODAY())=3,Y7,"0")
Apr =IF(MONTH(TODAY())=4,Z7,"0")
May =IF(MONTH(TODAY())=5,AA7,"0")
Jun =IF(MONTH(TODAY())=6,AB7,"0")
I think what you need is to just check to see if today's date is less than the month you are evaluating for.
This may be what you are looking for:
Feb =IF(MONTH(TODAY()) < 2,0,x7)
March =IF(MONTH(TODAY()) < 3,0,y7)
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.
I've been working on this for awhile and can't seem to find an appropriate way to code this.
Goal: Take a list of monthly returns that currently spans over three years (this is an automated list so it will keep adding months) and find MTD, QTD, & YTD using function so I can automate the process.
Problem: I've tried the OFFSET function, different versions of COUNT, IF statements and can't find a way to properly code the function.
NOTE: this is for stock data/earnings report
Just to clarify, I know how to do this manually, but want to automate the process :) Would be more than happy to use VBA but would like to stick to a simple function if possible...
I'd be more than happy to email the WS to someone. Thanks so much!!
If you want to keep it simple and avoid vba here is a suggestion
The manner in which the data sheet is presented matters.
I assume months go down, with there only being 1 column for 'monthly returns'?
On a separate area/worksheet, set up the months with a value for what they are in the column next to them. Ie
Jan 1
Feb 2
Mar 3
Apr 4
...
Dec 12
then have a drop down where you can select what month it is.
so if it is Jul, you can select Jul.
From here, do a vlookup/indexmatch to pull the number for the month through, so Jul would be 7
From here the MTD is easy.
Do an offset from the beginning of the year to the current month
=offset ([start point],[month number],[columns])
=OFFSET($D$1,$C$21,0)
start point will be one row above Jan, that way when Jan is chosen it will fall onto Jan.
Month number you will get from what was said earlier
and columns will depend on how you place it
YTD, you will do the same as above but have a sum
so
=sum(B3:offset ([start point],[month number],[columns]))
=SUM(D2:OFFSET($D$1,C21,0))
QTD would be easiest just plotting the sums as it would never change
So set out Q1,Q2,Q3 and Q4 as prefixed ones. Then lookup to them.
However, if you want to see the most recent quarter by a formula. On the month number list add a new column which says what quarter it is. Then
Jan 1 1
Feb 2 1
Mar 3 1
Apr 4 2
...
Dec 12 4
It should the read off a formula like so
=SUM(
OFFSET([start point],(INDEX([month number table],MATCH([month],[month list],0),3)-1)*3,0):
OFFSET([start point],INDEX(month number table],MATCH([month],[month list],0),2),0))
=SUM(
OFFSET($D$2,(INDEX($F$2:$H$13,MATCH($C$20,$F$2:$F$13,0),3)-1)*3,0):
OFFSET($D$1,INDEX($F$2:$H$13,MATCH($C$20,$F$2:$F$13,0),2),0)
)
What you are doing is to find the month at the beginning of the quarter and then sum to the current month.
Regarding this bit at the end
OFFSET([start point],(INDEX([month number table],MATCH([month],[month list],0),3)-1)*3,0):
You are finding the month quarter index number(1,2,3,4) and multiplying it by three. The reason you want to take away one before multiplying by three is because you want the start point of the quarter, thus in jan to march, this will be 0, and then you add a row to get the start point being Jan.
In Oct to Dec this will be (4-1) = 3. 3x3 = 9 which will be Oct to make Oct being the start point. Amend as need be.
The yellow section is what your actual information is presented as
The green section is your lookup area
The Blue area is information you are looking for with the lower bit reading from the lookup