Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Sameer9585
Creator II
Creator II

6 Months trend on user date selection

hello,

I need to know how to calculate 6 months trend of previous months based on the selected month

1 Solution

Accepted Solutions
ashok_rajm
Contributor III
Contributor III

Hi,
You can Calculate Start and end date in Variable and use those variable in Set analysis, But make sure Field Value format and Variable Value format are same -
Sum({<Reporting={'>= $(vStart_Date) <= $(vEnd_Date)'}>} Values)

vStart_Date = addmonths(Max(Date),-6)
vEnd_Date = Max(Date)

Hope this Helps.

View solution in original post

2 Replies
Pato1984
Partner
Partner

ashok_rajm
Contributor III
Contributor III

Hi,
You can Calculate Start and end date in Variable and use those variable in Set analysis, But make sure Field Value format and Variable Value format are same -
Sum({<Reporting={'>= $(vStart_Date) <= $(vEnd_Date)'}>} Values)

vStart_Date = addmonths(Max(Date),-6)
vEnd_Date = Max(Date)

Hope this Helps.