Monday, October 12, 2020

Group Dates in a Pivot Table


Grouping dates in a pivot table is one of those nice slice and dice features. If you get dates in a MM/DD/YYYY or DD/MM/YYYY format and want to see your data aggregated or rolled up into months, quarters, years or any other interval you need to group the dates. What is nice is you can expand and collapse the months (or whatever grouping or ungrouping you chose) to simplify your views. The other nice thing is that you can put the pivot table data into a chart and use the expand and collapse capabilities from the table to affect the chart or use the expand/collapse buttons on the chart itself. This chart can also be put on a separate sheet so you don't have to see the table. 

A note that is discussed in the video is what happens when you can't group and it may have something to do with the date format (Hint: It's not working because of text). There's another note on how this date grouping can be automatically done or undone.

Monday, October 5, 2020

Perform a Two Sample Proportion Test in Excel



When we want to compared the proportion of two groups (or samples), a suitable way to do this is with a two sample proportion hypothesis test. The question we're trying to answer is if there is a significant difference between the the proportion of the two groups/samples. This could be something like do the proportions of a drug effect females the same way they affect males or if the proportions of one group voting over a topic the same as another group. Too bad there is no tool to select a few cell ranges and gave an output (like t-test in the Excel Data Analysis Tookpak), but it's not too bad to manually lay out some cells and go through the formulas/functions to perform the hypothesis test.

Monday, September 28, 2020

Create a Calendar Table based on Start and End Date Inputs

If you're into building data models and your tables include dates, a good thing to have is a separate calendar table. You may want to create a calendar table that has the date, month name, year day name, etc. This gives you ways to slice and dice the data for further analysis and also a way to uniformly reference your other tables to one calendar table. It's fairly easy to create a list of dates in Excel by having a start date and incrementing by one day, but that is static. You'll always need to update it when new data comes in. The preferable way to do this is to automate it and that's when Power Query comes into play.