Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Creator II
Creator II

Re: Date Formula for between Reload Dates

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...

Highlighted
Master
Master

Re: Date Formula for between Reload Dates

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!”
Highlighted
Contributor III
Contributor III

Re: Date Formula for between Reload Dates

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

 

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