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

calculate difference based on number of days selected.

i have a requirement to calculate difference between days based on number of days selected.

for ex: if i select a day (10/11/2016) then QV should calculate difference between 10/11/2016 and 09/11/2016,


if i select 2 days (10/11/2016 and 09/11/2016,) then the difference should be calulated between 10/11/2016,09/11/2016 and 07/11/2016 and 08/11/2016, similarly for week and month

Can this be acheived?

The expression that i am using now is calculating difference of last 7 days and the previous week. can this be reused to acheive what i wanted to mentioned above?

sum({$<TransactionDate={">=$(vFirstOfLast7)<=$(vmaxDate)"}>} TAPNUM)

-

sum({$<TransactionDate={">=$(vTwoWeeksAgo)<=$(vEightDaysAgo)"}>} TAPNUM)

0 Replies