Actual and Projected Numbers on Chart

    It's a very common situation where we may want to show the Actual and Projected numbers. It can be expenditure, sales, revenue, profit, count of customers and so on.


    And Line chart is one of the best chart show this information (I still remember when I did it in Excel ). We can very precisely show this information in very attractive way using line chart. It's not very difficult to implement but often we don't use it. I am adding a Demo file which you can use as a reference while working on it.


    Since there is no direct way to achieve this, there is a trick to do that. All what you have to do is


    1.) Create first line with actual sales

        ex: Sum(Sales)


    2.) Create second line with actual sales + projected sales for the upcoming months.

        ex: If(<Condition to check for how many months we have actual data>, Sum(Sales), Sum(ProjectedSales))


    3.) Change the color of both lines, so that they can be easily differentiated.




    4.) Also, change the style of line i.e. solid, dotted and the thickness of lines. Make sure you are making the line which shows actual sales a bit wider ( as it would require to overlap the other line, so that other line is not visible).


    You can do it by going to Line style, '<W1.25>'

    This tag is used to change the width of line '<Wn>', In my example, I have made it 1.25 (you can change it per you requirement).




    5.) For the Projected line you also need the change the style apart from width.


    '<W0.5>' tag sets the width of line to 0.5 and '<S2>' tag sets the style of line to dotted.



    Some information about Line Style


    Only applicable on line, combo and radar charts. Click on
    Line Style in order to enter an attribute expression for calculating
    the line style for the line or line segment associated
    with the data point.
    The relative width of the line can be controlled by including
    a tag <Wn> where n is a multiplying factor to be applied
    on the default line width of the chart. The number n must be
    a real number between 0.5 and 8. Example: <W2.5>.
    The style of the line can be controlled by including a tag
    <Sn> where n is an integer between 1 and 4 indicating the
    style to be used (1=continous, 2= dashed, 3=dotted,
    4=dashed/dotted). Example: <S3>.
    The <Wn> and <Sn> tags can be freely combined, but only
    the first occurrence of each counts. The tags must be
    enclosed by single quotations.


    Please feel free to share your thoughts/suggestions etc.

    Demo.qvw (154.8 K) Download