PastDay formula
Hi, Sisense Community,
I use DiffPastPeriod() and PastDay() to show previous day's values or to calculate the difference with the previous day. BU the problem is that I don't have data for Sundays and it seems like the formulas DiffPastPeriod() and PastDay() actually refer to the -1 day, not the previous day in the dataset so I cannot compare values on Monday (I would expect Saturday data to be compared to Friday's) and Tuesday (I would expect to campare Mondays' data with Saturday's).
Is there a way to solve the problem? I was thinking abouat ranking the two recent days like 1 and 2 and filtering on that ranking. Is there a better way?
If you are looking for values as in highlighted column, please try below steps:
STEPS:
1. Create a custom column 'weeknumber' in table with below formula:
DayofWeek([Date])2. Use below formula in widget
case when(([Max weeknumber],Prev([Days in Date], 1)) = [Max weeknumber]-1) Then ([Total value],Prev([Days in Date], 1)) else ([Total value],Prev([Days in Date], 2)) end-Hari