Forum Discussion
Speed up SUMX formula
Hi All,
I need help with speeding up a formula that doesnt sum up correctly, so have to use SUMX to get the correct total.
However this is so slow at loading it times out when on BI server
What i am trying to essentially do is work out customers that gave notice and sum the last 12 months worth of revenue linked to a different table. cannot do relationship between two tables on Account Id due to BI not allowing on Many-to-Many etc
Formula below:
Terminated|Revenue|12m =
VAR TermDate =
SELECTEDVALUE ( 'Revenue'[Account_Id])
VAR results =
CALCULATE([Terminated|Revenue],
DATESINPERIOD (
'Date'[Date],
EOMONTH ( MAX ( 'Terminated|SF'[Notice]), 0 ),
-12, MONTH),USERELATIONSHIP('Date'[Date],'Terminated|SF'[Notice]))
RETURN
results
the sumx and summarize formula:
Terminated|Revenue|12m2 =
SUMX(
SUMMARIZE('Terminated|SF',
'Terminated|SF'[Account_Id],
'Terminated|SF'[Account_Name],
'Terminated|SF'[Notice]),
'Terminated|SF'[Terminated|Revenue|12m])
1 Reply
- AnonymousNot applicable
Hi fazza1991 ,
Please refer these documents, hope it could help you.
Performance Tuning DAX - Part 1 - Microsoft Power BI Community
Use tools to optimize Power BI performance - Training | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.