Changing Date Format for Pivot Table - date

I'm trying to make Pivot Table, but the double header with dates horizontally is making it really difficult. Any suggestions as to how to format this data to properly use a Pivot Table?
https://docs.google.com/spreadsheets/d/1QJdNjOYsLFE9Eoj2Wuni8yO0FbkVsjKsbg5hWeUc1yE/edit#gid=172133771

Related

Converting a measure to date for line chart in Tableau

I am trying to convert some measures that I have into dates for making a line chart. This is the data I have.
[
I am trying to make a line chart out of this data. But I cannot put it under a date since there are no dates in the dimensions. Any help would be appreciated.
You will need to some how reshape this data to create a single date field. You can do that out of Tableau or perhaps use Tableau prep. Your underlying data source is likely to drive that decision, you don't mention anything about that in your question.
Edit from comments:
Connect to the spreadsheet in Tableau. In the Data Source window, where it shows you all of the data in a table, select the 4 fields starting with Tuition and Fees. Then click on the drop down and Pivot those fields.
That will create 2 new fields, Pivot Field Names and Pivot Field Values.
In your workbook create 2 new calculated fields:
[FeeYear]: LEFT(RIGHT([Pivot Field Names],7),4)
and
[FeeDate]: MAKEDATE(INT([FeeYear]),1,1)
You can use FeeDate as the x axis of your line chart. Pivot Field Values is the measure to use in your line chart.

How to filter by current month automatically on pivot table google sheets?

As a data analyst, I would like to see the report in a pivot table automatically for the current month, so that I can take a look at it and don't have to change the date filter manually.
This is the formula to show the first day of the current month. (Which is the criteria I need, first of the current month)
=EOMONTH(today(),-1)+1
It works when I put this formula in any cell.
But when I put it in the pivot "filter by condition" option it doesn't work.
This is what I tried.
Text is exactly =EOMONTH(today(),-1)+1 (In formula box)
The date is exactly =EOMONTH(today(),-1)+1 (In formula box)
Here a screenshot of the options
Any help will be greatly appreciated.
I've never had great luck with the pivot table filter criteria in Sheets, I typically filter the data first if it's more advanced or use aggregating functions. In the Sheets pivot tables are better for quick analysis than dashboards.
There's probably a few ways to do it, but one of the easier ways would be to duplicate the data tab, clear the data and use a filter function to retrieve data. Update the Pivot table data source to the new tab. This will always only be the current month's data.
Basically you filter the data before the pivot table, with the [filter function][1].
=Filter(data , [date col]>=EOMONTH(today(),-1)+1 , [date col]< date(year(today()), month(today())+1,1)
You can also add a month column to the data and then filter on that column, however each month you would need to update the month filter in the pivot table.
=date(year([date cell]),Month([date cell]),1)
If you're using it for a 'dashboard' of sorts, I would generally recommend to create it yourself with aggregating formulas (sumifs, countifs, ect) and then you can use the more complex filters.
try custom formula:
=MONTH(A2)=MONTH(TODAY())
where A2 is first cell of column containing valid dates
You can try to Filter by a Custom Formula:
=month(DatePurchase)=month(TODAY())
Where DatePurchase is the Field Name.

Excel 2010 - Pivot using external csv file - how to make dates work?

I have a set of pivot tables that use external csv files as their data sources. The csv files originally contained dates in the format dd/mm/yy (e.g. 31/01/13). The pivot tables did not recognise these as dates. I converted the dates in the csv files to dd/mm/yyyy (e.g. 31/01/2013) but these were still not recognised as dates by the pivot tables.
I tried setting up a calculated field =DATEVALUE(date_from_csv) but when used in the pivot table (I'm using the Max option to select the most recent date) I get #VALUE! errors.
I have tried converting the csv file to xlsx and also importing the data into the workbook that contains the pivot table - but I can't change from the external connection to use the internal data. I don't want to rebuild the pivots as there are a lot of variables and formatting that would take ages to redo.
Any ideas??
The problem was caused by the date column being blank for some rows and I found that if I moved a row to the top (after the header line) that had all the fields filled in, then Excel got the formats correct and the pivot tables now work!

Dates filter tree view

I'm creating several pivot tables. I've got my data source with a date column (set as Date). When I add the date either as a filter or row/column I get a complete list of all dates instead of a nice tree view by Year / Month / Day.
Is anyone able to provide some assistance? I'm tearing my hair out!
I don't think you can group dates for a pivot table filter, you can only do it for a regular filter or for a row/column of a pivot table.
To do it, just add the date field to the row/column of the pivot table and on the table shown, right click on one of the dates and click 'group' or 'ungroup'.
Check this link for more details:
http://office.microsoft.com/en-001/excel-help/group-items-in-a-pivottable-report-HP010175903.aspx

iReport - organizing column output?

I am working on a profit and loss report that should look like this:
And my data table looks like this:
For this P&L I have query #1 that populates the data for the current month and the 3 months prior. Then I have query #2 to calculate a 6-month rolling average, and then query #3 to calculate a year-to-date total. They're all joined with union statements.
I can't figure out the best way to get this to render in iReport. Right now I am using a crosstab, and I was able to finagle the "measures" labels into the customer column using Bekwam's "Expanding a Crosstab" technique.
So my questions are - is there any easier way to do this? Every time I add a measure to the crosstab I have to rearrange the measures labels and fields. If I made a pivot table in Excel, I could click a drop-down box and choose to show or hide certain months - is there any way to do that in iReport? I feel like I must be missing something. If anyone else out there is displaying data in columns like this, how are you doing it? If you set up your detail band in columns, any tips for organizing output so it looks professional?
Thanks,
Lisa
I decided to create columns in the detail band. I put my measure labels in the first column and set them to print in that column only. Then I have my measures values print in each column. I wish I could tell iReport to print the measures values in columns 2-n, but I don't think that's possible.
Some customers will not have a value for each month in Query #1, so I've decided to join Query #1 on a calendar table (calendar table left join query #1) to add blanks as placeholders to preserve my formatting.