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: 
peterstalberg
Contributor III
Contributor III

How to indicate a sales budget in a bar chart?

Hi,

I have a bar chart showing the aggregated sales per month over a twelve month period. To make it visually easy for the teams to follow up during the year it would be nice to include a  straight line in the chart showing the budgeted sales.  As an example, the line shall start at $10 000 in January (month 1) and end at $150 000 in December (month 12).

What is the easiest way to achieve this?

Regards//Peter

Labels (1)
1 Solution

Accepted Solutions
peterstalberg
Contributor III
Contributor III
Author

I solved this by adding a table in the data script representing a straight line (one data point per month) where MONTH_OF_YEAR is the common X-axis. I then plotted the curve in a combo diagram. Below is an example of the script. Attached is a screen clip of the final result. Enjoy 🙂

Budget:
LOAD * inline [
BUDGET_OFFICE_NAME|BUDGET_YEAR_NR|MONTH_OF_YEAR|BUDGET_AMOUNT
Gothenburg|2020|1|178333
Gothenburg|2020|2|356667
Gothenburg|2020|3|535000
Gothenburg|2020|4|713333
Gothenburg|2020|5|891667
Gothenburg|2020|6|1070000
Gothenburg|2020|7|1248333
Gothenburg|2020|8|1426667
Gothenburg|2020|9|1605000
Gothenburg|2020|10|1783333
Gothenburg|2020|11|1961667
Gothenburg|2020|12|2140000
] (delimiter is '|');

View solution in original post

5 Replies
Wlad_Masi
Employee
Employee

@peterstalberg  Doesn't a simple line chart having sum of sales per Month resolve your problem?

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
dwforest
Specialist II
Specialist II

Under Add-ons in the properties, add a Reference Line

peterstalberg
Contributor III
Contributor III
Author

Thank you for your reply. I'm aiming for a combo chart with the bars indicating the aggregated sales per month and the line is the budget. Please refer to example in original post. IT seems the "real" problem is that the x-values (month number 1-12) are from different sources/tables. Rgds//Peter

peterstalberg
Contributor III
Contributor III
Author

Hi,

Thank you for your reply. This is a good interim solution I'm using now but what I really want to achieve is in the example in the original post. Rgds//Peter

peterstalberg
Contributor III
Contributor III
Author

I solved this by adding a table in the data script representing a straight line (one data point per month) where MONTH_OF_YEAR is the common X-axis. I then plotted the curve in a combo diagram. Below is an example of the script. Attached is a screen clip of the final result. Enjoy 🙂

Budget:
LOAD * inline [
BUDGET_OFFICE_NAME|BUDGET_YEAR_NR|MONTH_OF_YEAR|BUDGET_AMOUNT
Gothenburg|2020|1|178333
Gothenburg|2020|2|356667
Gothenburg|2020|3|535000
Gothenburg|2020|4|713333
Gothenburg|2020|5|891667
Gothenburg|2020|6|1070000
Gothenburg|2020|7|1248333
Gothenburg|2020|8|1426667
Gothenburg|2020|9|1605000
Gothenburg|2020|10|1783333
Gothenburg|2020|11|1961667
Gothenburg|2020|12|2140000
] (delimiter is '|');