Forum Discussion
Poor report performance
Ok, I've hit a wall on a report/dataset and am reaching out for suggestions from this group to improve the performance of my visual.
It's a report to calculate AR Aging and gives a historical "as of" view so we can see trends of our Aged AR balances over time. The report and visuals all calculate but one is painfully slow (4+ minutes in desktop and won't even load in Service).
I know the slow down is coming from using the FILTER function, which I have to use because I am filtering by a Measure. Hoping that someone else has a better idea than me to achieve the same result.
This is the visual that is the problem, and it's only a problem when I want to show the different buckets of our Aged balances. If I remove Aging from the Legend it loads fast. It's only the context of determining the buckets that slows it way down.
Here is my DAX.
My the Historical AR Dates is a calcualted table to get the month end for all months with this calculated table DAX.
Here are the realtionships.
I truely appreciate any guidance / suggestions on how to speed this up from 4+ minutes in desktop to load.
3 Replies
- AnonymousNot applicable
Hi Anonymous ,
First, you can use the Performance Analyzer to check which measures are taking longer to execute. After confirming this, you can refer to the following links to optimize your DAX.
1. Identify visuals that are impacting the performance of the report, and identify the reason for the impact by using the Performance Analyzer
Use Performance Analyzer to examine report element performance
2. Optimize DAX
HOW TO IMPROVE POWER BI PERFORMANCE - PART II
Best Regards
- AnonymousNot applicable
If your amount is a positive amount when is booking is debit (invoice) and the payment is negative (when the invoice is paid you can get the benefit by summarize this field by using this formula:
MEASURE:AMOUNT DUE PER MONTHEND =VAR S = SELECTEDVALUE(DATES[LAST DAY IN MONTH])RETURNCALCULATE([RUNNING TOTAL AMOUNT],'AR TRANSACTIONS'[DOCUMENTDATE]<= S && 'AR TRANSACTIONS'[PAYDATE > S)>> FOR INVOICES THAT ARE NOT PAID YET I PUT THE PAY DATE ON 31/12/9999IN THIS DAX FORMULA A RUNNING TOTAL IS USED:RUNNING TOTAL AMOUNT =CALCULATE(SUM('AR TRANSACTIONS'[AMOUNT]),FILTER(ALL(DATES[DATE]), DATES[DATE] <= MAX(DATES[DATE])))In my model is have a join between the date tabel created in DAX and the document dateThis only works if you amount column has negative numbers for payments and positive amounts for invoices!!I have millions of rows and do not have the problem you have. On the other hand for showing the right historical bucket classes I have a quite similar problem. Too much memory problem or the column for the aging classes shows nothing. Still working on that:) - AnonymousNot applicable
You might try this solution which might mitigate a lot of dax frustating hours...export every month automatically with Power Automate the data of the current outstanding amounts including snapshot_date, aging classes and pile them up on a onedrive folder and then extract them again with PowerBI but only take e.g. the last 6 months
https://www.youtube.com/playlist?list=PLDz00l_jz6zze26MVT-0YV7qcjismMFFo