Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How can I show Actual vs Forecast in a single Line Chart line where if there YTD Flag is not 1, use forecast values instead for the line?

Hi all,

I have a table that looks like this:

Month
YTD Flag
Actual
Forecast
Jan1100200
Feb1100200
Mar1100200
Apr1100200
May1100200
Jun1100200
Jul1100200
Aug1100200
Sep1100200
Oct-100300
Nov-100300
Dec-100300

What I would like to do is create a Line Chart where it shows using one line what the actual spend is and when there is no YTD flag, use Forecast value instead for the remaining months.

So in the aboe, up to Sep it would a line consisting of values up to 100, and then the line rises to 300 for Oct, Nov, and Dec because YTD flag has nothing.

Does anyone know how to do this please? Example of an expression?

3 Replies
Anil_Babu_Samineni

You can create line chart and then use full accumulation croon expression tab

Then don't suppress the null values. You might achieve

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jblomqvist
Specialist
Specialist
Author

Hi Anil,

I cannot use this. I am looking to do it the expression way.

Anil_Babu_Samineni

Ok, Like this

Capture.PNG

Dim is Month

Expression is If([YTD Flag] = 1, Sum(Actual), If([YTD Flag] = Null(), Sum(Forecast),Sum(Forecast)))


PFA

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)