Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I want to calculate the average report execution time per report. I created measure for average execution time.
AverageExecutionTime = CALCULATE(AVERAGE('Long Running Report'[TotalTime]),ALLEXCEPT('Long Running Report','Long Running Report'[ReportName]))Data has one column called ReportPath which I am using as filter. when I don't filter on ReportPath measure shows correct average value per report.
When I filter on ReportPath it shows wrong values.
I know this is happening because of ALLEXCEPT(ReportName) but is there any way to include filter as well. There could be more than one filter on dashboard in any case it should display correct average.
I am using DirectQueryMode cannot use FILTER.
Solved! Go to Solution.
Hi @jaydesai28,
Based on your data here, you can just remove the context of "TotalTime".
AverageExecutionTime =
CALCULATE (
AVERAGE ( 'Long Running Report'[TotalTime] ),
ALL ( 'Long Running Report'[TotalTime] )
)
Or you can add the context of ReportPath to your formula.
AverageExecutionTime 2 =
CALCULATE (
AVERAGE ( 'Long Running Report'[TotalTime] ),
ALLEXCEPT (
'Long Running Report',
'Long Running Report'[ReportName],
'Long Running Report'[ReportPath]
)
)
Best Regards,
Dale
Hi @jaydesai28,
Could you please mark the proper answer as a solution?
Best Regards,
Dale
Hi @jaydesai28,
Try out the function ALLSELECTED like below.
AverageExecutionTime =
CALCULATE (
AVERAGE ( 'Long Running Report'[TotalTime] ),
ALLSELECTED ( 'Long Running Report'[ReportName] )
)
Best Regards,
Dale
It does not show correct average time. It's a replication of TotalTime.
Hi @jaydesai28,
Based on your data here, you can just remove the context of "TotalTime".
AverageExecutionTime =
CALCULATE (
AVERAGE ( 'Long Running Report'[TotalTime] ),
ALL ( 'Long Running Report'[TotalTime] )
)
Or you can add the context of ReportPath to your formula.
AverageExecutionTime 2 =
CALCULATE (
AVERAGE ( 'Long Running Report'[TotalTime] ),
ALLEXCEPT (
'Long Running Report',
'Long Running Report'[ReportName],
'Long Running Report'[ReportPath]
)
)
Best Regards,
Dale
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 25 |