Forum Discussion
DanielV91
8 years agoFrequent Visitor
Calculated column based on rows position
Having the above table where delta is the difference between curent timestamp and previous one, I want to calculate the column for the far right. Which function should I use, or how can I appro...
- 8 years ago
Ah yeah, sorry.
Try it with an equals sign as well as the "<":
Column = "Observation "&CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[id]),Table1[timestamp]<=EARLIER(Table1[timestamp]),Table1[delta]>2)+1
Alex
DanielV91
8 years agoFrequent Visitor
alexei7 thanks for replying! It is very close, but the ones where delta is greater than 2 should have asigned the next number.
Basically for the ones that I marked with red should be '2'.
alexei7
8 years agoContinued Contributor
Ah yeah, sorry.
Try it with an equals sign as well as the "<":
Column = "Observation "&CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[id]),Table1[timestamp]<=EARLIER(Table1[timestamp]),Table1[delta]>2)+1
Alex