Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
varma8998
Contributor III
Contributor III

How to check max and min values automation

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

1 Reply
avinashelite

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)