I am not able to set the focused date to specific month for Angular KendoUI datepciker - kendo-ui-angular2

When setting the min date property for the kendo-datepicker control, the focused date is computed to the min date month.
I would like to set this to 'January' for all months inbetween the min and max date.
https://stackblitz.com/edit/angular-vx6vs3

Related

How to calculate accumulated vacation days in Excel based on days (and hours) worked per month?

TLDR: I need a way to track date values in a dynamic calendar and count the days I've worked on on a monthly base.
So I've made a dynamic calendar (in the 1904 Date system to enable negative time handling) to help me track days and hours worked in Excel that has some automatic features. I would now like to add a calculator to calculate the accumulation of vacation days based on the following conditions:
Days worked per month >= 14
OR
The total hours worked per month >= 35
If one or both of these conditions are met I will receive 2 vacation days (2.5 after the 1st year of employment) and the accumulated vacation days should be shown in a single cell C7 (see picture for reference).
I know that I need to calculate the days that I've worked on on a monthly base and compare the result to the 1st condition (and the same for the worked hours and compare the result to the 2nd condition, but the solution for that is much the same as for the 1st condition). I've made my calendar in a way that I can't use fixed cells to do the calculation, as the length of the calendar is fixed to 53 full weeks and the dates change to accommodate the length according to the year in cell C2 i.e. January 1st will not always be in cell D17. Here are the first 10 rows of my dynamic calendar in Table Markdown format with the formulas as asked.
Year
2023
Quota
=SUM(J11:J375;'2022'!C2)
Hours per week
37.5
Gross working days
=NETWORKDAYS(DATE(C2;1;1);DATE(C2;12;31);'1pyhapaivat'!B7:B21)
Net working days
=COUNTIF(H11:H381;">0")
Vacation Accumulation
Kilometers per day
36
Week No.
Date
Day
Start
end
Hours
Sum
Quota
Kilometers
Holidays
Note
=ISOWEEKNUM(D11)
=SEQUENCE(371;1;DATE($C$2;1;1)-WEEKDAY(DATE($C$2;1;1);2)+1;1)
=D11
=IF(M11="quota";-7,5/24;IF(G11>F11;IF((G11-F11)>(6/24);(G11-F11)-(0,5/24);(G11-F11));""))
=SUMIF(H11:H15;">0")
=I11-COUNTA(G11:G15)(($C$4/5)/24)-COUNTIF(M11:M15;"quota")(($C$4/5)/24)
=COUNTA(F11:F15)$C$8-(SUM(COUNTIF(M11:M15;"Remote");COUNTIF(M11:M15;"Office"))$C$8)
=XLOOKUP(D11;_1pyhapaivat3[Start Date];_1pyhapaivat3[Subject];"")
A snippet of the dynamic calendar
I've tried combining the DATE and SUM functions with other functions like COUNTA, and COUNTIF. I've also tried using different LOOKUP functions but to no avail.
The new dataset filtered by Year
And filtered again by Month

Calculating Monthly (Offset) Average In Excel

I have daily data entries for 3 indices. They do not feature every day of the month and for some days entries for one of the indices will miss; the quantity of cells per month differ. I want to calculate the average value for these individual indices starting the 16th of the prior month and going to the 15th of the current month (or the first date after the 15th/last day before the 16th if there is no entry). For example, in the screen grab below, the average for MXWO in the month of February would be the average of the array B14:B36 (and for January, B2:B13).
What my data looks like
I want to produce 4 columns: Date (Month-Year), average of MXWO, average of JPMIGHYS, and average of USTWBGD. Each of these averages needs to use the methodology described above. How might I achieve this?
I've tried using the OFFSET function, but since the cell increment changes month to month (there is a different amount of missing cells per month), this didn't work.

Is there a way to set monthly deductions on a value?

This is for personal budget and savings within an excel sheet.
Say I have a loan of £1000, I will be paying £10 per month as of 7th December 2019 until the amount is paid off.
I would like to have a summary page on my sheet displaying the current outstanding debt. Currently I can only seem to work out how to deduct the £10 if date greater than/ equal to 7th. Which is not useful as each month after the 7th it'll display £990.
What about DATEDIF:
=1000-((DATEDIF(43806,TODAY(),"M")+1)*10
Where:
1000 - Your starting loan
DATEFIF - Function to calculate difference between two dates in months
43806 - 1st Parameter: Starting date > 7th December 2019
TODAY - 2nd Paremter: Volatile function to feed the second parameter with current date
M - 3rd Parameter: Calculate difference in whole months
+1 - Amount of months + 1 to account for all payments
*10 - Difference in months times 10 to deduct from starting loan
This would be volatile though, so use sparsely.

Spotfire Bargraph to show Avg Quality by year for previous years and by month for current year

I have a bargraph which shows the quality of my data for each month. As the data is growing over the years, the graph is getting messy. So, i would like to show Avg Quality by year for all those months in Previous years but monthly for the current year.
Can any one help me how to achieve this.
Thanks,
-Dileep
This needs to be separated into two charts, or it just won't be legible. I'd suggest:
Creating an AVG by Year bar chart graph for all your data
Creating a details visualization of the above Yearly Average data which shows the 12 months of that year with SUM() as your aggregation method. Be sure to have YEAR > Month on your category axis
Thus, if you need to compare 1, 2, 3 or all the years by month you can select them all, or just the ones you want.
I was able to do it with the help of some calculated columns. To help explain, let's assume the value column in your data set is called Value and the date column in your data set is called ValueDate. I created some fictional data that extends into April, 2017 to help illustrate the solution.
Insert a calculated column to classify whether or not the date in each row is in the current year or not. I'm going to call the column DateGrouping.
CASE WHEN Year(DateTimeNow())=Year([ValueDate]) THEN "Monthly" WHEN Year(DateTimeNow())>Year([ValueDate]) THEN "Yearly" END AS [DateGrouping]
Insert a calculated column that tells us the last date of the month for ValueDate. E.g., if the date in the row is 4/10/2015, the last day of the month for the day in that row is 4/30/2015. If the date in the row is 7/8/2013, the last day of the month for the date in that row is 7/31/2013. We'll call this column LastDateOfMonth.
DateAdd("day",-1,date(Year([ValueDate]),Month(DateAdd("month",1,[ValueDate])),1))
Insert a calculated column that tells us the last date of the year for ValueDate. Of course, it's just Dec. 31 of ValueDate's year. Call this column LastDateOfYear.
Date(Year([ValueDate]),12,31)
Finally, we utilize the previous three calculated columns to add a calculated column for the date value we want to plot. You are wanting to plot by month for the current year, and by year for prior years.
CASE [DateGrouping] WHEN "Monthly" THEN [LastDayOfMonth] WHEN "Yearly" THEN [LastDateOfYear] END
On my value axis is the Value column, which I'm aggregating as an Average. On my category axis is the calculated DatePlot column -- I set the category axis to Categorical Scale. And I'm coloring by the calculated DateGrouping column to offer a visual cue that the data is aggregated differently over time.
Now, should this be done? There are certainly some pitfalls. You can't make the category axis Continuous Scale or else you'll see all the empty months when we're lumping prior years into Dec. 31. On the other hand, gaps are good visually when there is no data for a given period. So I don't know. But I pictured what you were asking and decided to try it. Buyer beware!

Update a date with the current month and year, but always keep the same day

In Excel I have:
(H10) Constant -----------17/04/2015 --------Been updating the month manually.
(H11) Day Counter -------28 -----------------=DAY(TODAY())
(H13) Last Update -------17/04/2015 ------=IF(H11=17, EDATE(H13,1), H10)
I can get the H13 to update to the new month by adding 1 to the month but once the counter moves off 17 it reverts back to the old date H10.
Is there any way in Excel to keep the 17th constant and update only the month and year every 17th?
If you just want a cell to automatically always show the next 17th of the month (i.e. the next one after today) then you can use this stand alone formula
=EOMONTH(TODAY()-16,0)+17
format with required date format
That will display 17-May-2015 until we reach 17th May, at which point it will change to 17-June-2015, and it will keep updating every month

Resources