Is there a way to calculate daily/monthly variance using pivot? - pivot

I am trying to divide daily values for a number of items (example text candles sales) against a monthly std deviation number. How do I calculate this by using pivot tables? I'm aware of the calculated field option but it does not let me take different frequencies i.e. std deviation on monthly basis for the items and revenues on a daily basis enter image description here

Related

Excel : calculating average within a group

I'm working with excel 2016. I have some unstructured data as in the screenshot. I would like to group the rows by zip code , then calculate the average of all the values in each zip code. I'm pretty new to excel. Is there a function or group of functions which can do this?
Given your table of data, to determine the zip avg price/acre you can do a weighted average.
for each zip, divide the total sales price by the total acreage
I changed the data into a Table so as to be able to use structured references; but you can change that to regular addressing if you prefer.
The formula for doing the weighted average:
=SUMIF([ZIP],[#ZIP],[price])/SUMIF([ZIP],[#ZIP],[acres])
Note that if you calculated the average of the price/acre for each zip code, you would be computing the Avg Price/Acre/Sale, not the Avg Price/Acre. For zips with multiple sales, the difference can be substantial
=AVERAGEIF([ZIP],[#ZIP],[Price/Acre])
If you just want to show the zip and the avg price/acre, you can use a Pivot Table:
Drag zip => rows area
Create a Calculated Field with the formula =Sum(price)/Sum(acres) and drag that to the Values area
And, of course, if you should want the avg price/acre/sale, drag the Price/Acre to the Values area, and choose to summarize by average.

Using the IF function in Excel Powerpivot with DAX

I am trying to use an if statement in excel measures for powerpivot tables. I am trying to calculate revenue per unit but I have one Product Line that calculates revenue differently than all the other Product Lines. The equation I am trying to use is =IF(tableA column = "certain Product Line", calculated revenue for PL/calculated units for PL, calculated revenue for all other PLs / Calculated units for all other PLs). For some reason I keep getting the error "Calculation error in measure, a single value for column 'PRODUCT_LINE' in table 'A' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result".

How do I create an extra column in an Excel Pivot Table to be able to calculate a percentage when using counts

We have an Excel Pivot Table based on a Jet Report table that displays a series of intervals tracking Customer On Time Delivery. The intervals are calculated as the difference between the Shipment Date and the original Requested Delivery Date. An On Time shipment has an interval of zero. Below is a screenshot of some sample data.
What I would like to do is to add a calculated column to the right of the Total that shows the On Time Percentage calculated as the Zero Interval count / Total count (e.g. 337 / 369 or 1,369 / 1,392), but I don't know how to determine which column contains the Zero Interval count. Is there anyway to do this within an Excel Pivot table? Thanks in advance for any ideas and/or suggestions.

Average daily max/min temperature if within date/time range in Excel

I have the following array formula which calculates the average daily temperature for a season (outlined in more detail here: Average day and night temperature in excel).
=AVERAGE(IF(Sheet1!$C$7:$C$17622>=$A$20,IF(Sheet1!$C$7:$C$17622<$A$21,IF(Sheet1!$B$7:$B$17622>=$B18,IF(Sheet1!$B$7:$B$17622<$B19,OFFSET(Sheet1!A$7:A$17622,0,(COLUMN(Sheet1!A$7)*3)))))))
The OFFSET function is to account for alternating columns of temperature and humidity for each site (site temperature/humidity are in columns in Sheet1; there are four columns for each site, hence the *3).
I can get the absolute maximum for each season by replacing AVERAGE with MAX.
However, I would like to obtain the average maximum/minimum daily and nightly temperatures for each season, but I cannot figure out how to do it (after several hours). I'd appreciate it if anyone could help me out here.
Sample data here:
https://www.dropbox.com/s/9brbxjbcrhjwrhc/Climate%20by%20season.xlsx?dl=0
Just add 1 extra column to 'collect' you daily maximum temperature and 1 more column for daily minimum temperature. Then use the same AVERAGE or AVERAGEIFS formula to work on each of these column to obtain your intended results.
Hope that helps. ( :

Can I calculate median if I do not have individual data points?

I need to calculate Median Time per Activity & Average Time per Activity.
I have only total data (Total number of activities & Total time). Average I calculated simply by dividing the two. Can I calculate Median from total data or do I need individual data points?
You will need all data points, if you want to get the median of a sorted list of numbers

Resources