I want to know how to calculate percentage difference , month against same month for adjacent years in Spotfire - spotfire

I want to calculate percentage difference ,month against same month for adjacent years in Spotfire. I want to calculate percentage difference ,month against same month for adjacent years in Spotfire. I used different Percentage year over year function which did not give me desired results.
Previous year balance (April 2022)= 4917789550.01Current year balance (April 2023) = 6936756767.18balance Difference =2,018,967,217.17% balance Difference= balance Difference divided by Previous year x100 Balance.
Which means 2,018,967,217.17 divided by 6936756767.18 x 100 = 41.05%
But Spotfire is giving me 0.41%
Kindly assist, I am new to Spotfire
enter image description here

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.

Calculate percentage difference in spotfire from previous values

I have a dataset with 2 types of vendors and each week contains different colors.
My requirement is to calculate the percentage difference of the particular color for the particular vendor from current week to the previous week.
for example: the percentage of color green for week 2, vendor A is 80%. Now I want to compare this with previous week's (week 1) green value of vendor A which is 40%. I want the output to say the percentage difference between the current 80% and previous 40%. The same applicable to Yellow color.
I am able to calculate the percentage of respective colors for each week for each vendor. I also created a new calculated column which gives the previous week number. But I don't know how to get the percentage of previous week and get the difference between previous week to the current week.
Any expert advices would be really helpful.
This should give you the percent from the previous week, same vendor and color:
SN(Last([Percent]) OVER (Intersect([Vendor],[color],Previous([week]))),0)
if there was no previous week etc, it is set to zero (SN function).
After that it you need to calculate the percent difference with your method of choice.

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!

grouping in an excel pivot table with different year end and quartiles

I have a pivot table with a lot of items currently grouped by date into quartiles and then months under that. My question is this, Our Financial year is not Jan to Jan so can I set up quartiles to reflect this? also our financial periods are not simply set months, they follow the months but are always full weeks around that. for example, P1 this year is 04/07/2015 - 07/08/2015. and Q1 would be 04/07/2015 - 02/09/2015.
Aside from manually grouping is there a way to set this up to happen automatically within Excel?
As stated by pnuts in the question's comments:
The most practical way may be to define the quarters (?) in your source data.
If you are at least using a Gregorian calendar, you may want to subtract an offset from your dates (i.e. # of days between 01-Jan-YYYY and DD-MMM-YYYY ... whereby the offset YYYY doesn't need to be the same as your date's YYYY). By this subtraction you get an "ordinal number" of the date within your business year.
[offset] =[FOY]-DATE(YEAR([FOY]),1,1)
So with your year starting on [FOY]=04-Jul-2015, you have an offset of of 184 days and a normalized date of
[date_normalized] = [current_date]-[offset]
So 04-Jul-2015 will be shrunk to 01-Jan-2015. Now the quarter easily calculates to
=CEILING(MONTH([date_normalized])/3,1)
... or =VALUE(MID("111222333444",MONTH([date_normalized]),1)) ... if you prefer
For your not-quite-months always being full weeks, I suggest to calculate a week number by
=MOD(CEILING(([date_normalized]+1)/7,1)-1,52)+1
to create a weekly reporting period 1 .. 52. With a further =CEILING(.../4,1) this can be converted to quasi-months having 4 weeks each.

Resources