4 Replies Latest reply on Oct 31, 2018 1:48 AM by Cédric Tran

# Show difference between actual and forecast in the same column

Hi everybody,

I'm currently struggling with showing the difference between Actual and Forecast in a useful manner.

I am trying to use a bar graph with stacked bars.

I have two values: the actual value and the forecast value.

As I can't share my workbook because the data is internal, I will show you a simple example here for better understanding of my problem.

I want my bar to look like this:

The actual value is 20000, the forecast value is 25000, the difference is calculated.

I would be very thankful for any help.

Best regards,

Moritz

• ###### 1. Re: Show difference between actual and forecast in the same column

Hi,

You can create a calculated column which shows the difference and then use measure names and measure values to create stacked bar chart.

Check out the below link for explanation :

Thanks,

AB

• ###### 2. Re: Show difference between actual and forecast in the same column

Hi,

thank you very much for your suggestion.

Unfortunately, it doesn't exactly fit my purpose (should've described it more specified).

So here is what I need to do in detail:

I have an actual value for May and a forecast value for June.

Then I am trying to show what the difference between the two values is in a stacked bar.

But I want to do this for multiple KPIs in the same graph.

Therefore, I can't use the time on columns because I have the different KPIs that would be mixed.

But I also cant' use the KPIs on the columns because then I can't create a stacked bar.

Thank you,

Moritz

• ###### 3. Re: Show difference between actual and forecast in the same column

The closest I came to solving it was this:

But I would love to show it as one bar.

Thanks again,

Moritz

• ###### 4. Re: Show difference between actual and forecast in the same column

Hi NeedHelpThanks,

To solve your requierment, you may have to play with table index.

1. put your date filed in the viz, year, month in discrete for instance

2. create a calculated field with this template: LOOKUP(SUM( [Forecast]) , 1) , call it "Forecast Month +1"

3. do a combo chart with sum(actual) and "Forecast Month +1"

4. you can also create the calculation of the difference and put it in Label.

Regards,

Cédric