Statistical functions on non-numerical value

时间:2018-06-19 11:11:08

标签: excel pivot-table tableau powerbi data-manipulation

I am not looking for any code or formula but a rationale/logic.

Background: My data set comes in Date/Time format where a new timestamp is created for each new occurrence of an event.

My goal is to calculate number of occurrences within each hour for a given day. Unfortunately, system does not capture number if occurrences per period as integers. So I have count the number of time an hour value appears within the hour i.e number of times 4 o'clock hour appears. I am currently using Pivot Table in Excel to count the number of times each hour appears. Fields in Rows are hour and dates, and field in Values is count of hour.

Trouble is that I cannot use any summarize functions to get stuff like sum, min, max, percentile, and standard deviation. For example, changing count to sum will only add up all hours. So sum of 4 o'clock hour will return 12 instead of 3. So I am having to use array formulas on pivot table to give me max and min etc.

If I was to use this data in data viz tools like Tableau or Power BI. I won't be able to get very far. I am looking for a suggestions/workaround that can allow me to manipulate my data in a way so it can be used in Pivot Tables in Excel and in data viz tools.

I know my questions is not specific to one tool but I am looking to enhance me understanding of data and data manipulations techniques.

EDIT: Please see attached image Values on the left is raw data and values on the right are derived from pivot table

1 个答案:

答案 0 :(得分:0)

Build a data model, using PowerPivot. Join your fact table to a calendar dimension table. Create a row count measure - you can then summarise that measure to suit (sum, average, min, etc)