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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
eburg
Frequent Visitor

Finding an AVG of MINX results

Hello, 

 

Looking for advice on how to get an average of daily minimum results. I have starting times i.e. 5am, 4am, etc. for each day in a table. I can use MINX to find the earliest time starting for each day and it returns the desired results. Now I'm looking to take an average of those MINX results to get the AVG start time across a month, period, etc. Thanks for any help!

1 ACCEPTED SOLUTION

Hi, @eburg 

Please check the below picture whether I understood correctly.

The first column is the year-quarter-month-week-date hierarchy column

The second column is Minimum time among all dates inside the hierarchy selection. If a date is selected, then it shows the minimum time among the many of a specific date. If a month is selected, then it shows the minimum time among the many of the days in the same month.

The third column is Average of each date's minimum time by shown period.

 

Min Time by day(s) =
MINX(Data, Data[StartTime])
 
Avg Min Time by period =
VAR newtable =
SUMMARIZE ( Data, Data[Date], "@mintime", [Min Time by day(s)] )
RETURN
FORMAT ( AVERAGEX ( newtable, [@mintime] ), "h:nn AM/PM" )
 
Picture1.pngPicture2.png
 
 
Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @eburg 

If it is OK with you, please share the sample data or sample pbix file. Then it might help me to understand more clearly and try to create a measure.

Thank you very much.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

minstart.PNG

The data looks like this. So if I create a measure Minx(Table, Start Time) it returns 5:00AM for this date 12/4/2020. So it looks like the same things across all dates. Looking to get an average of each of those Minx results across the month. 

Hi, @eburg 

Please check the below picture whether I understood correctly.

The first column is the year-quarter-month-week-date hierarchy column

The second column is Minimum time among all dates inside the hierarchy selection. If a date is selected, then it shows the minimum time among the many of a specific date. If a month is selected, then it shows the minimum time among the many of the days in the same month.

The third column is Average of each date's minimum time by shown period.

 

Min Time by day(s) =
MINX(Data, Data[StartTime])
 
Avg Min Time by period =
VAR newtable =
SUMMARIZE ( Data, Data[Date], "@mintime", [Min Time by day(s)] )
RETURN
FORMAT ( AVERAGEX ( newtable, [@mintime] ), "h:nn AM/PM" )
 
Picture1.pngPicture2.png
 
 
Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.