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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors