Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

On a line graph with date as a dimension, how to mark the current month?

Is there some way to change the chart style after a certain date?  Or a reference line?  I want to differentiate between past months and current & future months.  Whatever is within Qlikview capabilities...

http://i49.tinypic.com/ndmaq.png

1 Solution

Accepted Solutions
Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Hi,

Include Max() function in your script. See the attached.

 

if

(Max(MONTHSTART(EffChkDt)) >= MONTHSTART(TODAY()), '<S2>', '<S1>')

Regards,

Ricardo

5 Replies
Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Hi,

Yes, there's a way. Use the "Line Style". Read the documentation.

Attached, there's an example.

Regards,

Ricardo

"Line Style

Click on Line Style in order to enter an attribute expression for calculating the line style for the line or line segment associated with the data point. This type of attribute expression only has effect on line, combo and radar charts.

The relative width of the line can be controlled by including a tag <Wn> where n is a multiplying factor to be applied on the default line width of the chart. The number n must be a real number between 0.5 and 8. Example: <W2.5>. The style of the line can be controlled by including a tag <Sn> where n is an integer between 1 and 4 indicating the style to be used (1=continuous, 2= dashed, 3=dotted, 4=dashed/dotted). Example: <S3>. The <Wn> and <Sn> tags can be freely combined, but only the first occurrence of each counts. The tags must be enclosed by single quotations."

QlikView Desktop Documentation.

Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Doesn't seem to be working.  I put

if(MONTHSTART(EffChkDt) >= MONTHSTART(TODAY()), '<S2>', '<S1>')

as the expression for Line Style.  My dimension is EffChkDt, grouped, formatted to

=DATE(MONTHSTART(EffChkDt),'MMM YYYY')

=DATE(EffChkDt,'MM/DD/YYYY')

Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Share your app.

Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Here ya go.

Not applicable

Re: On a line graph with date as a dimension, how to mark the current month?

Hi,

Include Max() function in your script. See the attached.

 

if

(Max(MONTHSTART(EffChkDt)) >= MONTHSTART(TODAY()), '<S2>', '<S1>')

Regards,

Ricardo

Community Browser