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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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