Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Hope everyone is doing good.
Below is the Data table format
Previous Week
Country Date Amount
India 07/28/2020 1000
USA 07/28/2020 2000
Australia 07/28/2020 3000
NZ 07/28/2020 4000
Current Week
Country Date Amount
India 08/04/2020 1000
USA 08/04/2020 2000
Australia 08/04/2020 3000
NZ 08/04/2020 4000
My Question is every week data is going to add to the sheet so, I want to do Current - Previous of the last two weeks
Try like this in the front end
1.Create 2 variables like below
vCurrentWeek = max(Date,1)
vPreviousWeek = max(Date,2)
2. In chart
Dim: Country
Expression: Sum({<Date={'$(vCurrentWeek )'}>}Amount) - Sum({<Date={'$(vPreviousWeek )'}>}Amount)