Forum Discussion
Anonymous
6 years agoNot applicable
Alternative for AverageX
Hi, I have following working dax code. Since the data volume is high, it runs slow and gives memory error when filtered to lowest level. Is there a better alternative to using @AverageX? The code is...
sturlaws
Resident Rockstar
6 years agoHi Anonymous
could you try to rewrite the code to this:
Average Balance (Period) =
AVERAGEX (
values(account number),
[Daily Average Balance]
)
The idea is that the daily average balance has to be computed for each account number, and after that compute the average balance for all accounts. There is no need to include any time handling in the expression, it will be evaluated in the context from the report. E.g. if the report has a month slicer and April is selected, then the measure will calculate the average balance of April
Cheers,
Sturla
Anonymous
6 years agoNot applicable
Though your suggestion improves the performance, but it does not yield the desired results. It does not consider the dates when there was no transaction for a particular Accound Code. Also I have multiple hierarchy levels for Account code, and report can be drawn at any level.