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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Start graph on specific date

Dear all,

Last year I managed to create a chart with the maximum month = the month of selection and the minimum month = the selected month-12. So basically if I select april 2016, the chart would show me the results of april 2015 untill april 2016.

The expression used:

=(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=$(=Date(addmonths(Max(Date_MonthYear), -12), 'MMM-YY')) <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))

The value to select is thus "Date_MonthYear".

What I would like now is a chart starting on 01/01/2015 untill the selected month. I thought this would be easy but the expression below gives me all possible values. It does not start on the 01/01/2015.

=(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=01/01/2015 <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))

Can anybody help me please?

Kind regards

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=$(=Date(Yearstart(Max(Date_MonthYear)), 'MMM-YY')) <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))


(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=$(=Date(Yearstart(addmonths(Max(Date_MonthYear),-12)), 'MMM-YY')) <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))

View solution in original post

3 Replies
Kushal_Chawda
MVP
MVP

(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=$(=Date(Yearstart(Max(Date_MonthYear)), 'MMM-YY')) <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))


(sum({$<Date_Year=, Date_Month=, Date_MonthYear={">=$(=Date(Yearstart(addmonths(Max(Date_MonthYear),-12)), 'MMM-YY')) <=$(=Date(addmonths(Max(Date_MonthYear), 0),  'MMM-YY'))"}>}Sales))

Not applicable
Author

That is amazing.

Thank you so much!!

Kushal_Chawda
MVP
MVP

That's my pleasure