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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Avarages based on input value

Hi I have scenario,

I need show avarage sales based on input

If input=6 then it has to show last 6 months average

Input=12 it has to show last 12 months average

Please find the attached Excel and qvw files for reference

Regards

Thiru

10 Replies
Not applicable
Author

Hi

It's working

=AVG({<Date1={'>=$(=AddMonths(Date(V_DB_Max_date),-(Vinput-1)))<=$(=Date(V_DB_Max_date))'}>} Sales)

V_DB_MAX_DATE is the max date varaiable

Thanks

Thiru