Forum Discussion
Aron_Moore
Solution Specialist
7 years agoRow over row logic
A bit stumped here. Trying to enhance a dataset with a column that uses some logic. The data is coming from general ledger entries with the the two (or more) accounts an document posts to. Wh...
Anonymous
7 years agoNot applicable
Got it. I think this works, but I created this as a measure now instead of a calculated column like the previous approach. I set this up to represent your "Flag(end)." This could be easily modified for the other scenario if that's desired, though. Here's the new calc:
Flag Final = IF(SUMX(FILTER(ALL(Sheet1),Sheet1[Index]<= SELECTEDVALUE(Sheet1[Index])),Sheet1[Amount]) = 0,1)
And the output:
Let me know if this works.
Ben
Aron_Moore
Solution Specialist
7 years agoUh oh.
Added the column to the actual data, ~550k rows, and Power BI just spins "Working on it"....
Anyone have tips for optimization? Maybe replicate this logic with M? But how?
- Anonymous7 years agoNot applicable
Not sure what your data architecture/data structure looks like, but if I were you, I would try to put a calculation like this on the DB side. It's at the lowest grain of data and could just be incorporated into your driving table.