Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
cranium144
Creator
Creator

Set Analysis Date Range

I am attempting to compare a customer's quantity sold by part for the previous 6 months versus the company.  I have the date range code no problem.  But I'm having trouble with the set analysis to force the 6 months.  I am attempting to use a variable named v6MonthStart (inappropriately named) in the set analysis. 

The variable is defined as this:

'>=' & date(monthStart(addmonths(Today(),-6))) & ' <=' & date(MonthEnd(addmonths(Today(),-1)))

which produces this as desired.  >=9/1/2017 <=2/28/2018 (verified via text box).

My expression labeled Company 6 Months Average is:

=Sum({$<Date={$(v6MonthStart)}>} [Invoice Qty]) / 6

I'm getting no data.

Suggestions please?

30 Replies
sunny_talwar

Should work... not sure... can you share a sample?