Forum Discussion
kadapavel
7 years agoHelper II
sum rows based on condition
Hi, can someone help me to make sum calculation of each heat up sequence, shown on exapmle. In excel I can make reference to previous cell of same column I calculate, here I managed only to refer to ...
- 7 years ago
Hi kadapavel,
Sorry I missed that.
Can you try this:
1. Create a column that saves the index of the last row before heating begins:
Heat Start = IF([Prev Temp]>0, MAXX( FILTER(Table2, [Index] < EARLIER([Index]) && [Prev Temp] = 0), [Index]))2. Use the following calculation:
Sum of Each Heat Up = IF([Prev Temp] > 0, SUMX( FILTER(Table2, [Index] <= EARLIER([Index]) && [Index] >= EARLIER([Heat Start])), [Prev Temp]))I believe it works:
ofirk
7 years agoResolver II
Hi kadapavel,
Sorry I missed that.
Can you try this:
1. Create a column that saves the index of the last row before heating begins:
Heat Start =
IF([Prev Temp]>0,
MAXX(
FILTER(Table2,
[Index] < EARLIER([Index]) &&
[Prev Temp] = 0),
[Index]))
2. Use the following calculation:
Sum of Each Heat Up =
IF([Prev Temp] > 0,
SUMX(
FILTER(Table2,
[Index] <= EARLIER([Index]) &&
[Index] >= EARLIER([Heat Start])),
[Prev Temp]))I believe it works:
kadapavel
7 years agoHelper II
Thank you very much! Great solution!