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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
metcala
Helper III
Helper III

Forecast/Actuals based on current date

Hi there

 

I currently have two separate tables one containing actual costs by project by month and the other containing the forecast by project by month.

 

Actuals

 

ProjectMonthCost
A31/1/24100
A29/2/24200
A31/3/24150
B31/1/24100
B29/2/24100
B31/3/2475

 

Forecast

 

ProjectMonthCost
A31/1/24200
A29/2/24200
A31/3/24200
A30/4/24200
A31/5/24200
.........
B31/1/24100
B29/2/24100
B31/3/24100
B30/4/24100
B31/5/24100
.........

 

I am looking to create a table as below which uses actuals for previous months and forecast for current and future months. Currently the tables are not linked, assume I will need some sort of date table to link these and then a dax measure to populate the table?

 

Project31/1/2429/2/2431/3/2430/4/2431/5/24...
A100200150200200...
B10010075100100...

 

Any help on this would be very much appreciated!!

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@metcala what is your backend source? If it is some SQL server, you can view it with the unique value, if not then you can easily do it in PQ, assuming the forecast table has all the projects.

 

- right click on the forecast table and click reference, it will duplicate the forecast table

- select project column, right-click, remove other columns

- select the project column, and right-click, select remove duplicates.

 

rename this table as you see fit and here you have a table with unique values of all the projects.

 

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@metcala what is your backend source? If it is some SQL server, you can view it with the unique value, if not then you can easily do it in PQ, assuming the forecast table has all the projects.

 

- right click on the forecast table and click reference, it will duplicate the forecast table

- select project column, right-click, remove other columns

- select the project column, and right-click, select remove duplicates.

 

rename this table as you see fit and here you have a table with unique values of all the projects.

 

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

metcala
Helper III
Helper III

@parry2k Thanks so much for the quick reply that's really helpful.

 

What would be the best way to create the project dimension table? Every project will have a forecast so is there an easy way to just create a table using unique values from the forecast table project column?

parry2k
Super User
Super User

@metcala you need two dimension tables, one date dimension, and the other project dimension.  Project table will have unique project ids. Set the relationship of these new tables with the actual and forecast table on the respective column.

 

On matrix visual, use date from the date dimension, project from the project dimension, and add the following measure to use on the value. Tweak this measure as you see fit but this will get you started.

 

Measure = 
VAR __Actual = SUM ( ActualTable[Actual Column] )
VAR __Forecast = SUM ( ForecastTable[Forecast Column] )
VAR __Display = IF ( MAX ( 'Date Table'[Date] ) <= TODAY (), __Actual, __Forecast )
RETURN
__Display

 

 

As a best practice, add a date dimension in your model and use it for time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools. Check the related videos on my YT channel

 

Add Date Dimension
Importance of Date Dimension
Mark date dimension as a date table - why and how?
Time Intelligence Playlist

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors