Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Sameer9585
Contributor

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
New Contributor III

Re: 6 Months trend on user date selection

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.
2 Replies
Highlighted
Partner
Partner

Re: 6 Months trend on user date selection

ashok_rajm
New Contributor III

Re: 6 Months trend on user date selection

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.