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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set chart to pick max date by default

Hello,

Find attached.

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution could be:

default / without selection:

QlikCommunity_Message_146195_Pic1.JPG

QlikCommunity_Message_146195_Pic2.JPG

but still showing the result for a selected Month:

QlikCommunity_Message_146195_Pic3.JPG

QlikCommunity_Message_146195_Pic4.JPG

Using this chart expression:

Sum({$<MonthName={'$(=Date(Max(MonthName),'YYYY/MMM'))'}>} Data)

and changing your load script to generate an additional MonthName field during load instead of a list box with expression to do so:

table1:

CrossTable(Month, Data, 3)

LOAD Year,

     Revenue,

     Station,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     Jul,

     Aug,

     Sep,

     Oct,

     Nov,

     Dec

FROM

[http://community.qlik.com/servlet/JiveServlet/download/682486-142273/period.xlsx]

(ooxml, embedded labels, table is Sheet1);

Left Join

LOAD Distinct

  Year,

  Month,

  Date#(Year&'/'&Month, 'YYYY/MMM') as MonthName

Resident table1;

hope this helps

regards

Marco

View solution in original post

1 Reply
MarcoWedel

Hi,

one solution could be:

default / without selection:

QlikCommunity_Message_146195_Pic1.JPG

QlikCommunity_Message_146195_Pic2.JPG

but still showing the result for a selected Month:

QlikCommunity_Message_146195_Pic3.JPG

QlikCommunity_Message_146195_Pic4.JPG

Using this chart expression:

Sum({$<MonthName={'$(=Date(Max(MonthName),'YYYY/MMM'))'}>} Data)

and changing your load script to generate an additional MonthName field during load instead of a list box with expression to do so:

table1:

CrossTable(Month, Data, 3)

LOAD Year,

     Revenue,

     Station,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     Jul,

     Aug,

     Sep,

     Oct,

     Nov,

     Dec

FROM

[http://community.qlik.com/servlet/JiveServlet/download/682486-142273/period.xlsx]

(ooxml, embedded labels, table is Sheet1);

Left Join

LOAD Distinct

  Year,

  Month,

  Date#(Year&'/'&Month, 'YYYY/MMM') as MonthName

Resident table1;

hope this helps

regards

Marco