Forum Discussion
Difference from previous cell
- 6 years agoUnless it is prefecture columns throwing things off I would think:
diff = [testedPositive] - maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [Last date] <earlier([Last date])),[testedPositive])
owlet0214 , prefer to create a date from the year , month and day and create two new columns like
Last date = maxx(filter(table,[city]=earlier([city]) && [Date] <earlier([Date])),[Date])
diff = [tested positive] - maxx(filter(table,[city]=earlier([city]) && [Date] <earlier([Last Date])),[tested positive])
Thanks a lot !
I haven't gotten the expected number yet, but I think it's getting closer to the correct answer.
I will try a little more.
I use below.
Last date = maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [YYYYMMDD2] <earlier([YYYYMMDD2])),[YYYYMMDD2])
diff = [testedPositive] - maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [YYYYMMDD2] <earlier([Last date])),[testedPositive])
- Greg_Deckler6 years agoCommunity ChampionUnless it is prefecture columns throwing things off I would think:
diff = [testedPositive] - maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [Last date] <earlier([Last date])),[testedPositive]) - Syndicate_Admin4 years agoAdministrator
Hello, I have an identical situation, and I already managed to rescue the previous value with respect to the date, but I can not do it by differentiating it by city, I do not know if you can explain to me how it was that you used the variable of [prefectureNameE] and earlier([prefectureNameE]) for this case.
Best regards.