Forum Discussion
Anonymous
5 years agoNot applicable
Power BI index creating memory issues
I created a Index through power query (the index function) and it is causing some memory issues.
I need my dax to look at the previous row and this is what I have so far:
Quantity test1 =
CALCULATE(
SUM(Table[Quantity]),
FILTER(ALLEXCEPT(Table,Table[ItemId],Table[CompanyId],Table[Warehouse]
)
,Table[Index] <= MIN(Table[Index])
)
)
I am loading ~30,000 rows into my power bi which is working fine, but once I try to add the measure into my table visual, it is taking up ~24gb of memory before I have to kill it.
Is there a way to optimize this so it will not take as much memory to run?
3 Replies
- HotChilli
Community Champion
It won't be the index that is causing the problem. It is the combination of the ALLEXCEPT and the context transition. Do you want to post a data sample (not a picture) showing the desired result and we can attempt a re-write?
- AnonymousNot applicable
Can you explain more on that error? This site is not letting me post in a table and it seems to be an ongoing issue.
I have 4 columns:
- ItemId
- Warehouse
- Quantity
- Index
- CompanyId
I need a running total of the quantity based on the preceding line item grouped by the other 4 dimensions.
1 -> 15
2 -> 14
3 -> 12
4 -> 9
5 -> 5
But it needs to take into account the warehouse, item and company.
- amitchandak
Super User