Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Fig1
Contributor III
Contributor III

Date Formula for between Reload Dates

I am needing to create a formula for activity between two reload dates.  I currently load a qvd weekly which gives me all data from a point in time (01/01/2018). As well as displaying statistics each week for that point in time I would also like to show the difference in numbers of the activity that occurred just between the two reload dates.

Example: 

Chart: 

week1 - Total discharges 120

week2 - Total discharges 160

//I would like to create a new chart showing  the difference of '40' as a figure.

example formula I have tried but didn't work: ED_DatePulled=('>=$(=(max(ED_DatePulled)-7))<=$(=max(ED_DatePulled))'

Labels (1)
3 Replies
UserID2626
Partner - Creator III
Partner - Creator III

Sum({<Date=,Month=,Week=,Year=,Quarter=>}[Discharges])-Above(Sum({<Date=,Month=,Week=,Year=,Quarter=>}[Discharges]))

Use week as dimension and enter all date related fields in red part to get correct result.

https://community.qlik.com/t5/QlikView-App-Development/ASK-set-analysis-to-ignore-date-selection/m-p...

HirisH_V7
Master
Master

Can be this:

Sum({$<ED_DatePulled={">=$(=Date(Max(ED_DatePulled)-7))<=$(=Max(ED_DatePulled))"} >} Sales)

If you need only week wise differences then the case will be different, we need to fetch weeks from date in script and compare it with current  and previous weeks i.e max week to last next week.

HirisH
“Aspire to Inspire before we Expire!”
Fig1
Contributor III
Contributor III
Author

Thanks for responses.  I ended up using a rangesum formula for my charts.

 

rangesum(count(episodes))-
rangesum(above(count(episodes)))