Forum Discussion
averagex
- 9 years ago
Hi, Try this please:
1. Create a measure to count the days between the range selected in Date Slicer (Plus 1)
DayBetweenFirst&LastDaySelected+1 = DATEDIFF ( MIN ( AirCraft[Date] ), MAX ( AirCraft[Date] ), DAY ) + 1
2. Create a measure to calculate the Average Daily Hour
AverageDailyHour = DIVIDE ( SUM ( AirCraft[Hours] ), [DayBetweenFirst&LastDaySelected+1] )
Here's an actual visual of the PowerBI dashboard that I'm developing:
Obviously I am working with much more detailed data than what I presented as the example. You can see at the top the user can use the date scroller to identify the specific dates he wants to review (MIN and MAX). The data then refreshes with the new utilization charts (hours and cycles), and the hourly and cyclic daily averages are supposed to show up in the cards to the right.
Hi, Try this please:
1. Create a measure to count the days between the range selected in Date Slicer (Plus 1)
DayBetweenFirst&LastDaySelected+1 = DATEDIFF ( MIN ( AirCraft[Date] ), MAX ( AirCraft[Date] ), DAY ) + 1
2. Create a measure to calculate the Average Daily Hour
AverageDailyHour = DIVIDE ( SUM ( AirCraft[Hours] ), [DayBetweenFirst&LastDaySelected+1] )
- wrwillits9 years agoHelper III
It's working! Thanks for that.
Also, I'm still a bit confused at to why AVERAGEX wouldn't work. Were the missing dates causing the issue?