Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

How to build line chart?

Hi,

I have recently started working on Qlik View and have installed Qlik View 9.0 Personal Edition.

I have a requirement to develop a line chart. My SQL table contains 3 columns for quantities which are historical, forecast and actual. I also have a date column. This table thus has rows which has 3 quantities i.e. Forecast, Actual and Historical quantities for various dates.

Now i need to display these 3 quantities across various dates on a chart, hence i understand that i would be using line chart for this purpose.

On this line chart, i also have a requirement wherein all quantity values which are in future dates compared to current date need to be displayed as dashed lines. Hence the line would be solid till current date and beyond that if there are any entries for future date compared to current date, the line would be dashed or dotted. This needs to be done for all the 3 lines i.e. for historical, actual and forecast.

Can anybody help/suggest me how to develop this type of line chart with dashed/dotted line for future quantity values?

Any help would be greatly appreciated.

Thanks

Anurag

1 Solution

Accepted Solutions
Not applicable

How to build line chart?

Hi Anu,

I do have personnel edition. So if i post a application also you'll not be able to open my application and don't try to open as well, Since you'll have only 4 recoveries for the personnel edition.

Ok, coming to the point now. Your script should be as follow.


LOAD PLACE,
date([SALE DATE],'DD/MM/YYYY') as [SALE DATE],
[HISTORICAL (KGs)],
[FORECAST (KGs)],
[ACTUAL (KGs)]
FROM
"D:\Documents and Settings\XXXXXXX\Desktop\4532[1].Line chart_data.xls"
(biff, embedded labels, table is [SQL Results$]);
[\Code]
As i said earlier you need to add the below expression in Expression -> expand + -> line Style.
[Code]
if([SALE DATE] <=today(),'<S1>','<S2>')


Check the attached image for your reference.

Reply me for further clarification.

Hope this may help you.

-Peterson

11 Replies
Not applicable

How to build line chart?

Hi,

Its very much possibel. Can pls post sample data in excel wich will contain your date, history, forecast and actual sales data with your o/p?

-Peterson

Not applicable

How to build line chart?

Hi,

Attached is the application will demonstrate you the qlikview feature.


if((Day)<9,'<S1>','<S2>')


You need to write the above expression in Expression Tab -> expand + symbol in expression and line style

-Peterson

Not applicable

How to build line chart?

Hi Kevin,

As you mentioned, i am attaching a sample excel data (Line chart_data.xls).

Also would request, that if you are attaching some example using this excel data, plz give it in such a way that it opens on the Qlik View 9.0 Personal Edition on my machine.

Please let me know if you need any other inputs.

Thanks and Regards

Anurag[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/4532.Line-chart_5F00_data.xls:550:0]

Not applicable

How to build line chart?

Hi Anurag

Can u pleas show the chart on excel actually what u wants?

thanks

Zaman

Not applicable

How to build line chart?

Hi Anu,

I do have personnel edition. So if i post a application also you'll not be able to open my application and don't try to open as well, Since you'll have only 4 recoveries for the personnel edition.

Ok, coming to the point now. Your script should be as follow.


LOAD PLACE,
date([SALE DATE],'DD/MM/YYYY') as [SALE DATE],
[HISTORICAL (KGs)],
[FORECAST (KGs)],
[ACTUAL (KGs)]
FROM
"D:\Documents and Settings\XXXXXXX\Desktop\4532[1].Line chart_data.xls"
(biff, embedded labels, table is [SQL Results$]);
[\Code]
As i said earlier you need to add the below expression in Expression -> expand + -> line Style.
[Code]
if([SALE DATE] <=today(),'<S1>','<S2>')


Check the attached image for your reference.

Reply me for further clarification.

Hope this may help you.

-Peterson

Not applicable

How to build line chart?

Hi Kevin,

Thanks for your reply. It worked in my case too.

Appreciate your inputs.

Zaman,

Kevin already attached the output chart in one of his earlier posts which was what i was looking for.

Thanks again for your help.

Anurag

Not applicable

How to build line chart?

Can anyone tell me where I might find more of these expression values? For instance;

'<S1>' = Solid Line

'<S2>' = Dashed Line

'<S3>' = Etc....

What about line widths..? '<W1>' ? What other options are there? '<R1>'? '<T5>'? '<D3>'? '<K2>'? Anything else....?

Thank you.

Not applicable

How to build line chart?

I would like to know this as well.. Smile

Not applicable

How to build line chart?

I created a new post HERE for this question since I did not get many answers...