Forum Discussion

Grevatious's avatar
Grevatious
Frequent Visitor
5 years ago
Solved

Hourly Average

Hello everybody!

 

I've been trying for a while to calculate the hourly average in USD and in # of transactions, but all of my attempts have failed.

 

I have a data set that contains Order Number, Creation Date, Creation Hour, SKU and Price. What I need is to calculate the average hour by hour in a given date period so that I could compare it with the current day, for example:

 

Today from 00 to 10, there have been 15 transactions with a value of $1500. The average of the last three months in the same hour range is 12 transaction with a total value of $1200.

 

Updated today 10AM
 USD#Transactions
TODAY150015
AVG L3M120012

 

My dataset is something like this:

 

OrderCreation DateCreation HourSKUPrice
10011/10/20209456784.5
10011/10/20209576898
10011/10/20209879653.2
10021/10/2020109098710
10021/10/202010576898
10031/10/2020129057312.5
10041/10/202012576898
10055/10/202014456784.5
10068/10/20205576898
10079/10/20208879653.2
10079/10/2020109098710
10079/10/202010576898
100810/11/2020119057312.5
100810/11/202011576898

 

In which every order number is a transaction.

 

I have tried using Averagex with no avail.

 

Thank you all in advance.

2 Replies

  • AlB's avatar
    AlB
    Community Champion

    Hi Grevatious 

    There are many things unclear. What role does SKU and Order number play? You only talk A proper, complete example based on the data you show ont he table would help

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers