Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Thimios
Helper III
Helper III

Hourly average sales

Hi all,

I have a large sales table (sample below) with sales lines for the last 5 years.

       Thimios_0-1708979595304.png

I need to calculate average hourly sales per year so I can have multiple lines in a visual such as the one below:

      Thimios_1-1708979735841.png

 

1 ACCEPTED SOLUTION

You didn't specify if you want this per order or per line item.  I assumed the former.

 

lbendlin_0-1709084285979.png

 

 

View solution in original post

8 REPLIES 8
talespin
Solution Sage
Solution Sage

hi @Thimios 

 

Is it possible to share pbix file sample data and with all sensitive data removed.

Here you are. Let me know if you need additional info.

https://we.tl/t-xVpUalv49d

Hard one @talespin. This is a huge model and requires lot of work...

Will try to provide a similar one, hopefully soon.

Not sure if the last one was the latest version @talespin .

Pls download this https://we.tl/t-nGsshiJaP9 

You didn't specify if you want this per order or per line item.  I assumed the former.

 

lbendlin_0-1709084285979.png

 

 

Thank you @lbendlin, worked perfectly.

I also created a similar measure per day.

 

Sales Avg Daily =
var a = summarize('SALES', SALES[DATE])
var b = ADDCOLUMNS(a,"sm",CALCULATE(sum(SALES[VALUE])))
return AVERAGEX(b, [sm])
lbendlin
Super User
Super User

Sounds good. What have you tried and where are you stuck?

Thanks for asking @lbendlin .

Tried using Sales Avg Hourly = AVERAGEX( VALUES( 'Time Table'[Hour] ), [SALES] ) where 

  • 'Time Table' is a support table
  • SALES = SUM ('Sales'[VALUE])

What I get in line chart, shows Total Sales (the sum of sales) instead of the average.

Thimios_1-1709012645675.png

Here is the above as table:

Thimios_2-1709012707999.png

Could it be that a miss something about hte context?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.