7 Replies Latest reply: Sep 11, 2014 3:34 PM by Massimo Grossi

# Chart Line Style

Hello,

I created a Line chart with:

• Dimensions:
• Month
• Product & ' - ' & Metric_Type (Calculated Dimension)
• Expression:
• (Sum({<\$(vMAT)>}Values) - the variable is to show the last 12 month

I have two Metric_Type (SO and SI). I want the the Line Style to be different for the Metric_Types, so I tried this scripts in the Line Style of the expression:

• =if(Metric_Type='SI','<S3>')
• =if(mid(Product & ' - ' & Metric_Type,1,2) ='SI','<S3>')

but didn't work...

Suggestions?

Francisco

• ###### Re: Chart Line Style

I think your first expression should work (it seemms to work in the attachment)

=if(Metric_Type='SI','<S3>')

• ###### Re: Chart Line Style

Yes thats what I thought, but its not working...

Any work around?

Thks,

• ###### Re: Chart Line Style

did you open the attachment?

why isn't working?

SI lines are dotted, not SI normal

• ###### Re: Chart Line Style

Yes it looks like what I, did but its not working...

If I did not find the solution, I will send you the qvw...

Rgds,

FLC

• ###### Re: Chart Line Style

The problem is my expression as set analysis to show the last 12 months including the selected month:

=Sum({<Year=, Month=, Year_Month={">=\$(=Max(Year_Month)-99) <=\$(=Max(Year_Month))"}>}Values)

if I use a simple expression like:

=Sum(Values)

and select the 12 months it works fine!

Is there a solution using the first expression?

Regards,

FLC

• ###### Re: Chart Line Style

The problem is my expression as set analysis to show the last 12 months including the selected month:

=Sum({<Year=, Month=, Year_Month={">=\$(=Max(Year_Month)-99) <=\$(=Max(Year_Month))"}>}Values)

if I use a simple expression like:

=Sum(Values)

and select the 12 months it works fine!

Is there a solution using the first expression?

Regards,

FLC

• ###### Re: Chart Line Style

post a qlik doc, if possible