Forum Discussion
Query Resources Exceeded Error
- 1 year ago
Hello Raja10ram ,
you need to minimize the load, try removing complex measures from the table and make it in Power query.
- 1 year ago
Hi Raja10ram
The "Resources Exceeded" error in Power BI typically occurs when a query or its calculations consume more memory than the configured limit. Here are some strategies to optimize your query and manage resource limitations effectively:
Simplify Your Query:
- Review and simplify your query by removing unnecessary columns, filters, or transformations.
- Ensure you're only loading the data needed for your report.
Reduce Data Volume:
- Filter your data to load only a subset, such as a specific date range or relevant categories.
- Consider aggregating or summarizing data at the source level before importing it into Power BI.
Optimize Data Model:
- Use best practices for modeling your data, such as avoiding overly complex relationships and using role-playing dimensions.
- Prefer calculated tables over calculated columns when possible.
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
I have been trying with this formulas to find out drawdown but when i am running the max dax function in the table its giving me the same value all over though i sort the date which is in date/time format. I am not understanding the reason why please help me out. I think its taking the max value directly what should i change to the running max ?
[DailyCumulativeProfit] itself already uses ALL(trade_logs) inside, so when you call it inside another MAXX + ALL(trade_logs), the filter context gets overridden and you don’t get a row-by-row running max. Instead, you’re getting the same max value applied to the whole table.
You need to calculate the running max cumulative profit over time by referencing the measure result per date, not recalculating it globally.
RunningMaxPnL =
VAR CurrentDate = MAX(trade_logs[date])
RETURN
CALCULATE(
MAX([DailyCumulativeProfit]),
FILTER(
ALLSELECTED(trade_logs[date]),
trade_logs[date] <= CurrentDate
)
)