Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm sorry to bother you during the weekend. I've been trying to figure this business requirement out.
The intent is to get the Monthly Average in hours based on
1. Average age that are not Closed
2. Average age that are Closed
and use a line chart to indicate the two measures. Similar to the view below. Don't worry about the Month's Initial I can do it.
Duration (Hrs) =
VAR blankclosedates = DATE(1900,1,1)
VAR diffhrs = If('Sample Data'[ClosedDateTime] = blankclosedates, BLANK(),
DATEDIFF('Sample Data'[CreatedDateTime], 'Sample Data'[ClosedDateTime], HOUR))
RETURN diffhrs
///// Looks like simple average will not work
Average Hourly = AVERAGE('Sample Data'[Duration (Hrs)] )
I do have my date table set up inside my model.
Any ideas on how to approach this type of issue? TIA
Solved! Go to Solution.
Hi @v_mark ,
Create a month column.
Month = FORMAT('Sample Data'[Date],"MMMM")
Then create measures.
_closed = CALCULATE(AVERAGE('Sample Data'[Duration (Hrs)]),FILTER(ALLEXCEPT('Sample Data','Sample Data'[Month]),'Sample Data'[Status]="closed"))
not_closed = CALCULATE(AVERAGE('Sample Data'[Duration (Hrs)]),FILTER(ALLEXCEPT('Sample Data','Sample Data'[Month]),'Sample Data'[Status]<>"closed"))
Best Regards,
Jay
Hi @v_mark ,
Create a month column.
Month = FORMAT('Sample Data'[Date],"MMMM")
Then create measures.
_closed = CALCULATE(AVERAGE('Sample Data'[Duration (Hrs)]),FILTER(ALLEXCEPT('Sample Data','Sample Data'[Month]),'Sample Data'[Status]="closed"))
not_closed = CALCULATE(AVERAGE('Sample Data'[Duration (Hrs)]),FILTER(ALLEXCEPT('Sample Data','Sample Data'[Month]),'Sample Data'[Status]<>"closed"))
Best Regards,
Jay
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
63 | |
52 | |
36 | |
36 |
User | Count |
---|---|
81 | |
71 | |
58 | |
45 | |
44 |