Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with Monthly Trend and Targets

Dear all,

I'm getting crazy with this problem.

I have the following excel tables that I load from two different files:

Table 1: Events. Single events occurring in a specified month and with a dedicated description

SiteMonthEvent Description
A1utyu
B1tyuty
A1tyuty
C1jhgj
D2hfghf
A2wrwer
C2werwe
B2r5435
E3sdfsd

Table 2: Cumulative targets on the number of events, per Site, per month

Site MonthCum Target
A13
A25
A37
A49
A511
A613
A715
A817
A919
A1021
A1123
A1225
B11
B23
B35
B47
B59
B611
B713
B815
B917
B1019
B1121
B1223

I'd like to draw a bar+line chart where I have:

  • the year months (1 to 12) on the X axis
  • the number of events per month as a bar chart, added cumulatively month by month
  • the sum of the cumulative targets per month as a line chart

then I could filter on the "site" in order to get specific details.

I seek your help as I can't understand how to properly set the dimension and the expressions.

I think that I should set a fixed dimension from 1 to 12 and then get the right expressions to collect and sum the results per each month on the two tables.

But currently I'm not able to get such result.

Thank you for any help.

Giuseppe

6 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Ouch! So sorry I have QlikView Personal edition and I can't open the file! Can you attach screenshots of the chart config tabs?  or a short description of the solution that I'll try to replicate.  Thank you a lot! Giuseppe
Gysbert_Wassenaar

Create a new chart. Choose Combo Chart as chart type. Add Month as dimension and add two expressions:

  • Number of Events: count(DISTINCT [Event Description])
  • Cumulative Target: sum([Cum Target])

Set the Display option to Bar for the Number of Events expression.

Set the Display option to Line for the Cumulative Target expression.

Enable the option Full Accumulation for the Number of Events expression.

Add a listbox for the Site field so you can select sites.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you a lot, it works perfectly.

I need another small tweak.

In my real table 1 I have an additional column named "Year" that contains the year number relevant to the month during which the event happened at a specific site.

What happens is that if I filter the "year" field for 2014 (as an example) and I have data only for months 1 and 2 (Jan and Feb), the chart will remove from the x axis all the other months leaving only two bars and a line segment connecting the target point values of Jan and Feb.

Instead, I'd like to still have all the 12 months on the x axis in order to display the two bars relevant to Jan and Feb performance and the full trendline for the cumulative target from Jan to Dec of the selected year.

I hope the description of the problem is clear enough.

Thank you for the excellent support!

Giuseppe

Gysbert_Wassenaar

Try adding an extra expression sum({<Year=>}1). Uncheck all Display options for the expression so it won't show in the chart. The {<Year=>} will make sure that the expression ignores selections in the Year field.


talk is cheap, supply exceeds demand
Not applicable
Author

well, now filtering on 2014 (that has events in months 1 and 2 only) correctly leaves the x axis with all the 12 months.

However:

  • bar data from table 1 is displayed correctly on months 1  and 2
  • the line chart only consider data from months 1 and 2 also. From the filtered data table (table 2) I can see that when 2014 is selected, data in table 2 is filtered on months 1 and 2 only. Therefore the x axis is ok but such filter prevents from displaying all the points/months in the line chart

Let me know if you have any further idea...

Thank you.