Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stock line chart

Hello

I'm a beginner in qlikview, I want to create a stock line chart with date as a dimension and price (or return) as measure.

The problem is the date dimension has daily granularity and the stock chart continues forever. Is there a way to aggregate the date dimension in order to make the stock chart fit on screen without making a second fact table with monthly granularity for example.

When I put Month(Date) as a dimension, months show up but not for different years, and the measure does a AVG(Price) for both januarys of all years. Instead I want a stock line chart that shows the price line in all (2) years. I don't want it to show anything when I have not selected a stock from my stock listbox. Otherwise I want it to show price lines for all my selected stocks.

Ideas ?

2 Replies
Gysbert_Wassenaar

You can try =MonthStart(Date) as a dimension or something like =Date(MonthStart(Date),'YYYY-MMM'). But the preferred way is to create a field in the script instead of using a calculated dimension. If you create several fields like year, quarter, month you can use a cyclic or drill-down group and use that as chart dimension. That way you can easily switch between the different period types with a cyclic groupe or drill-down with a drill-down group.


talk is cheap, supply exceeds demand
Not applicable
Author

I already have the field Date(MonthStart(Date),'YYYY-MMM') in my script. Problem is when qlikview has to associate a value of  [Adj Close] for each value in the dimension.  Since my data is daily (adj close for each day) i can do an average of Adj Close for each month and that works out well, but I don't wanna do that. For every month, I want to pick the price of the first day (available) in that month, which means the first day maybe 2nd or 3rd or maybe later