Forum Discussion

Laris_Fdz's avatar
Laris_Fdz
Cloud Apps
03-24-2022
Solved

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 a...
  • harikm007's avatar
    03-31-2022

    Laris_Fdz ,

    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