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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Average,STDEV,count by hour+day of week

Hi, I'm trying to create a bar graph with:

y axis=hour

x axis=the following fields

 

I have a field that correspond to day of the week.

 

I'm trying to show in the previous graph (x=hour):

-count for the current day

-average count by day of the week, for those with same day of today (to graph with hour in the x axis)

-STDV by day of the week, for those with same day of today (same as average)

 

So: Tuesday count by hour, for past tuesdays AVERAGE AND STDV by hour.

 

I'm trying AVERAGEX fitering by day of the week, but the result have no sense.

Any ideas of where can I start?

thank you!

1 ACCEPTED SOLUTION

@Anonymous,

Create the following measure in your original table.

Measure = COUNT(Hoja1[codigo])


Then create the group table using DAX below. However, could you please describe more details about how you calculate average in Excel? As I notice that there is no 07:30 data for Jueves at 10/11/2018.

GroupTable = SUMMARIZE(Hoja1,Hoja1[fecha],Hoja1[DiaSemana],Hoja1[Tipo],Hoja1[hora],"Total",[Measure])

1.PNG2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

Please share sample data of your table and post expected result here following the instructions in this post: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi, sorry for the lack of information in previous post, can't attach a file here so here's the google Drive link to excel input/expected result +pbix almost empty, every test I made give wrong results.

 

https://drive.google.com/open?id=1vd8JSB-0Vew4oWz9ZaEs4GTNtSsRVVlu

 

There you have the pbix with the excel loaded, the source excel and the expected output in excel: 

-Raw has the database data

-In grouped I count records

-In AVG_STDV I calculate the average and DSTV from the current day and the values for today until the hour I extract the data.

 

-Then in the graph (I don't have much data now so it seems a little ugly but I show: current value, average and 1 standard deviation up and down to the average for each hour.

 

General idea: to know the normal process function and improve the management of the demand.

 

Thank you!

@Anonymous,

Create the following measure in your original table.

Measure = COUNT(Hoja1[codigo])


Then create the group table using DAX below. However, could you please describe more details about how you calculate average in Excel? As I notice that there is no 07:30 data for Jueves at 10/11/2018.

GroupTable = SUMMARIZE(Hoja1,Hoja1[fecha],Hoja1[DiaSemana],Hoja1[Tipo],Hoja1[hora],"Total",[Measure])

1.PNG2.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you! I didn't know the SUMARIZE function, is like a GROUP BY,

To calculate the average y transform the N/A to 0, but that was because the system was in testing, I will have values for all interval (or I'll se how to fill empty values with "0"), I let that to another fase, I don't thing that will be so simple

thanks!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.