Forum Discussion
Pan_Forex
Helper III
2 years agorow minus previous row
Hello, I am trying to count the difference in points between the latest ID and the previous one for each employee. I have a very simple bug somewhere and I can't find it... id emplo...
- 2 years ago
Total Points = SUM ( pan[points] )Output = VAR PreviousValue = CALCULATE ( [Total Points], OFFSET ( -1, ALL ( pan[employee], pan[id] ), ORDERBY ( pan[id], ASC ), PARTITIONBY ( pan[employee] ) ) ) VAR CurrentValue = [Total Points] VAR GroupingByID = ISINSCOPE ( pan[id] ) VAR Result = IF ( NOT ISBLANK ( PreviousValue ) && GroupingByID, CurrentValue - PreviousValue ) RETURN Result
Kaviraj11
Solution Sage
2 years agoHow large is the dataset?
Here are the articles to resolve the memory issues.
How to Fix Memory Allocation Error in Power BI Desktop - Monocroft
Pan_Forex
Helper III
2 years agoIt is not large, as it has about 100,000 records
- Kaviraj112 years ago
Solution Sage
Would need more information to understand the root cause. Are you getting the error after creating a calculated column? and make sure the dataset is sorted as well
- Pan_Forex2 years ago
Helper III
I solved this problem and as you can see in the picture sometimes it counts right and sometimes wrong. What could this be due to?