Optimize Performance on Cost per Unit Member
I am trying to optimize the performance of a calculation within our ASO cube that's calculating a cost per unit. Below is the current logic attached the to the account:
Case When Not IsLevel([SourcingProduct].CurrentMember,0) OR Not IsLevel([SourcingSupplier].CurrentMember,0)
Then
[AC.ACTUAL.COST] /
([AC.POUNDS.USAGE] + [AC.EACHES.USAGE] + [AC.FEET.USAGE])
Else
[AC.ACTUAL.COST.PER.UNIT.INPUT]
End
While the calculation returns the correct value, the performance for the end user is slow. Is there any way to add logic to only focus on intersections with data instead of all?
Thanks in advance for any input!