Dates filter tree view - date

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

Related

In Tableau, is there a way to only show the first and last date in the table output using the date filter

Tableau will generally show every single date within table output of the date ranges filtered for. Is there a way to only show the first and last date in the table for the date of ranges selected?
I created an image of the desired output in excel. Link below:
Desired output example
Thank you in advance!
The feature that will address your goal is called a Level of Detail (LOD) calculation. They have many uses and take various forms. I suggest reading about the in the online help.
But, to answer your question, the LOD calc to find the first (i.e. minimum) value in a date field called, say, Transaction Date, is;
{ MIN([Transaction Date]) }
The formula for the latest value is left as an exercise for the reader 😊

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.

Tableau - YTD, MTD as columns in text table

I'm trying to find a way to create a table like the one above, but instead of having columns of months I would like to have columns of MTD, QTD, YTD for all selected measure values. I created calculated fields on the [Date] field but when I try to use that it still splits the data in to separate columns of months and quarters... I'm using two data sources and they are linked on the [Date] field. If I try to put two of my calculated fields in the columns bar it just combines them like 'MTD/YTD'. How can I get them to display as separate columns?
I know this is strange because there will be overlapping data (everything in the MTD will also be in the QTD and the YTD).
I found a way to do this. I created a calculated field on the date field and assigned 'MTD' to all records from the last month. Then I assigned 'QTD' to all records from the start of the quarter to the day before the start date of the 'MTD' records. Then I assigned 'YTD' to all records from the start of the year to the day before the start of the 'QTD' records. (this way there are no overlapping records).
After that I just did a quick table calc to make each of them a 'running total' table (across).
I created parameters for the dates so the can easily be updated.

Tableau - Similar function to SQL Group by

I have recently started using Tableau but am still very new to it. I don't know enough of the Tableau vocabulary to be able to find this answer through brute force googling. Hopefully some one here can help point me in a good direction.
I have a simple table of data, containing the columns and types: Date (Date), ID (Numerical), and Status (Text)
I want to be able to generate a report that has: Date, and Percent of the IDs on that date where the Status is "Complete."
In SQL I could do this by running a query along the lines of:
select date, (count(status like "Complete")/count(status)*100) from table
group by date;
Where can I look for this in Tableau? I tried creating a new Calculated measure in the sheet I am working on, but I couldn't find any built in functions that would add this ability. Thanks for any assistance.
So this should be pretty easy. In your tableau screen(when in a sheet) on the left you will see a column which is broken into two. On the top are the "Dimensions"(these are the things you will organise your data on, usually strings or dates) and on the bottom are the "Measures"(these are integers).
So under dimensions you should see "Date" and "Status". In the Dimensions you should see "Number of Records" and "ID"(this is your variable, you can convert it to a dimension by right clicking and selecting that option).
So what you need to do:
You just want status = complete, so drag your "Status" field into the Filter box(just to the right of the dimension column). You will get a pop up of the different types, select "Complete".
This has filtered your data source for only complete rows.
Drag you "Date" field to the "Rows" shelf, on the top of the screen. This will default to the Year of the date.
It will automatically go to a bar chart, change it to a table by selecting "Show Me" on the top right and select the table icon.
Double click on your "Number of Records" measure. This will add it to your sheet. This will now be auto summed per year.
To convert it to % of, right click on the measure in the Marks window(it should look like a green box "SUM(Number ....)"). Right click and select the option "quick table calculation", here select "Percentage of Total".
You will now have the % total per year for all records where status is equal to correct.
(Optional) - To adjust the date dimension, right click on the "Date" Pill(its up the top in the rows shelf). Hear you can see different options for quarter, month, day. You can change it to any of these or a custom data format.

Expression to create SSRS column dynamically

I need an expression to take an existing column and recreate this column over and over before another column/s where the column name contains either "Monday" or the date of the column falls on Monday.
The reason I need this expression is to repeat a header column in a pivoted report that is pivoting start/enddate parameter. So if a user selects to run the report for this month, they should get 31 columns (for each date/day) and header repeating before every Monday.
Make sure your dataset contains all the dates in your date range. If not create a date table and cross join to it. Don't pivot the results, let SSRS do that bit. Once your dataset has all the dates, you can use a matrix in your report and drop the date colum into the column group. This will give you one column for each date in your dataset. I'm not at my PC at the moment but if you need any more help, show an example of your dataset and I'll put together a quick sample report.