Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhan_ram
Creator II
Creator II

Line graph

Hi All,

I have a requirement to show six months in the dimension in a line graph but the expression should be able to calculate all the year data.

Attached file for your reference. Could you please help to get the expected output.

Regards,

Padmanabhan

4 Replies
gautik92
Specialist III
Specialist III

can yu attach sample qvw ??

padmanabhan_ram
Creator II
Creator II
Author

Please find the attached qvw. !

jonathandienst
Partner - Champion III
Partner - Champion III

You need to convert your MonthName field to a dual date format. Something like this will do it

LOAD Brand,

  Date#(MonthName, 'MMM-YY') As MonthName,

  Value

INLINE

[

  Brand, MonthName, Value

  ...

Now for the last 6 months, you can use AddMonths in a set expression, like this:

     SUM({<MonthName = {">$(=Date(AddMonths(MonthName, -6), 'MMM-YY'))"}>} Value)

And you should sort the field numerically.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
padmanabhan_ram
Creator II
Creator II
Author

Hi Jonathan,

Thanks for the response. I want for six months but not for last six months, it is like alternate months.

And if I apply the above as you said, it gives no data to display.

Regards,

Padmanabhan