Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I feel like I'm missing something fundamental in context here but I just can't figure out what.
I have the following schema with relationships going to a fact table USA Timelisting and a Calendar table.
I am trying to do a simple Matrix visual that is made up of the following fields and measures with a Slicer for USA Accounts
'USA Projects'[Project]
'USA Tasks'[Task]
#Hrs Pct Used = DIVIDE( SUM( 'USA TimeListing'[Hours] ), SUM( 'USA Tasks'[TaskPlannedHours] ), 0 )
#Hrs Pct Used Duration =
VAR varTaskStart = MIN('USA Tasks'[Task Planned Start])
VAR varTaskEnd = MAX('USA Tasks'[Task Planned Finish])
VAR varBillableHrsTotal = CALCULATE(SUM('@CalendarOne'[WorkHours]), FILTER( ALLSELECTED( '@CalendarOne'[Date] ), '@CalendarOne'[Date] <= varTaskEnd))
VAR varBillableHrsToDate = CALCULATE(SUM('@CalendarOne'[WorkHours]), FILTER( ALLSELECTED( '@CalendarOne'[Date] ), '@CalendarOne'[Date] <= MIN(TODAY(), varTaskEnd)))
RETURN
DIVIDE(varBillableHrsToDate, varBillableHrsTotal, 0)
Problem:
Scenario 1 combination of fields in the table give a fine performance
Scenario 2 combination of fields in the table give a fine performance
But when I try and put both Project and Task with the 2 measures, it takes super long. I think there are more iterations happening than are necessary.
Any advice would be much appreciated, this is driving me crazy.
@Juliecal73 Did you ever figure out how to fix this? I'm coming across the same thing.
Will CROSSFILTER help in this scenario?
First thing I would try is to pull the
MIN(TODAY(), varTaskEnd)
into a variable and use it in the FILTER.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks @mahoneypat . Yes, neater, but as expected did not make any difference to the performance.
Can you provide a sample PBIX file (changing any confidential column headings if necessary)?
Proud to be a Super User!
Paul on Linkedin.
Unfortunately it is a big file with other reports in it (haven't got around to seperating them out) so not really possible to provide.
Ok, I'll let others try to work it out then. Good luck!
Proud to be a Super User!
Paul on Linkedin.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |