Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Top006
Frequent Visitor

Comparing forecasted value with actual, same month, 1, 2 & 3 months prior

Greetings,

 

I have a forecast running, forecasting a demand for the current month +3 months ahead.

 

Each month I save the data in order to compare this with the actual values. This is all put into a seperate PBI report together with the actual deliveries.

My issue is that I don't know how to create the measures needed to be able to compare eg. actual delivered for April '22 with the forecasted for April 3, 2, 1 & 0 month prior.

 

Tabel A: Forecasted volume (row headers indicate delivery date, column headers indicate when the data was saved)

  2022202220222022202220222022
  JanFebMarAprMayJunJul
2022Jan

84

      
2022Feb4220     
2022Mar365711    
2022Apr5578014   
2022May 85 152794  
2022Jun  9514135 
2022Jul   44379762

 

Tabel B: What actually was supplied each month

  Actual
2022Jan93
2022Feb63
2022Mar21
2022Apr96
2022May38
2022Jun21
2022Jul53
2022Aug20

 

Expected output would be to find the forecasted volume for the same month and 1, 2, & 3 months prior as below:

  Same month1 month prior2 months prior3 months prior
2022Jan84   
2022Feb2042  
2022Mar115736 
2022Apr1480755
2022May94271585
2022Jun3541519
2022Jul62973744
2022Aug71786496

 

And finally ending up wiht the difference between the forecasted and the actual volume:

  Same month1 month prior2 months prior3 months prior
2022Jan-9   
2022Feb-43-21  
2022Mar-103615 
2022Apr-82-16-89-41
2022May56-11-2347
2022Jun142030-12
2022Jul944-16-9
2022Aug51584476

 

Table A and B is comined via a date table.

 

Any help is be much appreciated as I'm stuck.

 

Many thanks in advance

 

Thomas

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Top006 

 

The current format of Table A is not friendlly to be used with DAX. The tables should be flat tables which means the first row is for column headers and the other rows are for records. So it would be better to have Table A in the following format. 

vjingzhang_0-1681712520976.png

Table B:

vjingzhang_1-1681712572351.png

 

Then create several measures to get the results you want. I also have a Date table in the model. You can download the attachment at bottom to see the formula of those measures. 

vjingzhang_2-1681713127734.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
Top006
Frequent Visitor

Hi @v-jingzhang,

 

Sorry for the late respond on this.
Thank you very much for above suggestion and example - That did the trick.

 

Have a nice day ahead.

 

v-jingzhang
Community Support
Community Support

Hi @Top006 

 

The current format of Table A is not friendlly to be used with DAX. The tables should be flat tables which means the first row is for column headers and the other rows are for records. So it would be better to have Table A in the following format. 

vjingzhang_0-1681712520976.png

Table B:

vjingzhang_1-1681712572351.png

 

Then create several measures to get the results you want. I also have a Date table in the model. You can download the attachment at bottom to see the formula of those measures. 

vjingzhang_2-1681713127734.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.