Sum between Dates dynamically - date

I want to calculate SUM of my data with monthly cycle start date 26 and end date of 25 of each month. Could you please help me out on this?
File Link is below for your reference.
https://drive.google.com/file/d/1nnXGQ5T6ayHl7O6nfUD6BOhl7FaWTCSG/view?usp=share_link
Actually I am trying to draw S-Curve Month Wise with Cut-off date: 25 of each month.
I have data for each day and I want to sum that data month wise with starting from 26 of the month and ending with 25 for each month to get data month wise.

Related

Caculate WindowAvg with Date filter

I am trying to calculate a 20 Day moving Avg using the WindowAvg function. However I only want to show the latest days data. Using a date filter to show most recent date only affects the 20 Day moving avg calculation.
WINDOW_AVG(COUNTD([SLIP_NUMBER]),LAST()-19,0)
Adding a date filter to only display current days 20 DayMovingAvg only gives me Count for the current day.

How to handle day of week adjustment

I am trying to resolve an issue involving comparing Year Over Year data results by day, and cant seem to quite figure it out.
I want to be able to accurately compare Year Over Year results by a specific day - Historically we have been calculating this as [Years Back] * 364 to obtain the number of days between the two dates, but as the yearly difference becomes greater than 7 it becomes incorrectly calculated.
I attached a picture here showing the anomaly where there is not a constant difference YoY and between two dates. 2015 is not a leap year.
Labor Day vs Memorial Day - YoY:
What is the best way to calculate any given dates past equivalent date? If I have two calendar tables, what do I match on? (I can get any of the following fields to match Date, Day of Week Number, Day of Month November, Week Number of Month, Week number of Calendar Year etc.)
For example, need to input the date, and have an output of past year equivalent
Like So:
Given Date | Past Year equivalent
20190902 | 20180903
20190902 | 20170904
20190902 | 20160905
20190902 | 20150907
20190902 | 20140901

Fiscal year week number with week starting on monday in DAX

Im new to power Bi. I want to derive a calculated column in date dimension with the week starting with monday. Weeknum function is there but it will give normal week number, not fiscal week number.
screen shot of the date dim:

Average Volume Every Weekday In a Month Tableau

I am trying to calculate an expression in Tableau 10.2 for a contact center use case.
I have calls at every hour all days of the week.
I need to calculate the average call per hour per day. For instance i need to calculate the average call every Sunday at 9 pm and use that in tool tip.
By this i am measuring how many average calls we get on a given Sunday or any other day of the week at a particular hour.
I had written an expression sadly that is not resulting in accurate number
AVG({ FIXED [Weekday Flagging],[Hour]:
AVG([Volume])})
Do suggest.
Very Recently I had a same requirement to see avg visitors on the hours of all the days of a week. My requirement was (Total No. Of Visitors on Sundays/No.Of Sundays) and then (Total No of Visitors #hour/No. Of Sundays).
1)create a calculated field : sum(volume)/countd(date) and name it 'Avg Volume'
2)drag date to 'Columns'. From the drop down click 'More' -> 'Weekday'
3)drag the calculated field to rows. This will give avg volume on each days of a week.
To get Avg Volume of hours
1)do the same procedure as above and instead of 'Weekday', drag Hour of the day to the column.
Link these 2 sheets using an action filter, so that if u click on sunday in the first sheet, it will show the avg volume of each hour of sunday in the second sheet.

Tableau - weekly average from daily data

Using Tableau 8.1.
Daily data like this:
Date Sales
1-1-14 $5
1-2-14 $2
...
6-15-14 $15
Which can be aggregated to weeks of course
Week 1 $15
Week 2 $12
Week 3 $10
Week 4 $13
etc.
I would like to get the weekly average of each month
So like this:
Weekly Average
Month 1 (weekly average of the weekly total sales) ($15+$12+$10+13)/4 = 12.5
Month 2
Month 3
Does that make sense? If ou simply put "average" in the tableau table, it gives the average daily value PER WEEK (or month) < - I don't want that. I want the average of the weekly totals per month.
Quite simple, actually.
Create these calculations
Unique Weeks = COUNTD(DATEPART('week',[Date]))
Weekly Average = sum([Sales])/[Unique Weeks]
Then simply report Weekly Average x Month (or Quarter or Year, etc.)
(Note: Some weeks have < 7 days).
This can be done very simply with one calculated field.
WINDOW_AVG(SUM([Sales]))
Then drag your Date pill onto the rows shelf twice, one aggregated to day, the other to week. Make sure pills are set to discrete (blue) and drag your Sales measure onto the shelf, also as discrete.