O'Reilly logo

QlikView for Finance by B. Diane Blackwood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Trend and forecast lines in charts

We will start by adding a trend line to the lower chart, Monthly Sales and Margin. Then, we will add a forecasted trend line out 3 months to the upper chart, with a 12-month rolling average.

Adding a trend line to the monthly sales and margin chart

  1. Right-click on the chart titled Monthly Sales and Margin and choose Properties:
  2. Navigate to the Dimensions tab.
  3. Click on the Add button to add a new dimension.
  4. On the right-hand side in the Label box, type the word Trend.
  5. Next, click on the ellipses to enter the formula for our trend line:
    if(v12month<=month(today()),sum({<YYYYMM ={">$(v12month)"}>}[Sales Amount]),avg(total aggr(if(v12month<=month(today()),sum([Sales Amount])),v12month)))

    Our formula says that, if the variable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required