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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anders1
Frequent Visitor

Adding rows for actual finance-data for pre forecast periods

I have this dataset with financial data. I have actual data first 3 periods of the year, and i have a few forecasts, one with data from period 2 and one with data from period 3. But the forecasts do not have data for months that have passed. For the forecast data i want to add rows of actual data in the periods that have no forecastdata. Prefer to add this data in power-query, so that when the table is loaded i can filter on one of the forecast, and it will show actual data for the periods that have no forecastdata. If there is a better solution to create a DAX for this, it may be an alternative, but my other tables in the dataset is build up like this. The table will be populated with new forecasts each period in the future. 

 

YearPeriodnrPlanAmount
20251Actuals10
20252Actuals20
20253Actuals30
20252Forecast 130
20253Forecast 140
20254Forecast 150
20255Forecast 150
20256Forecast 160
20257Forecast 170
20258Forecast 180
20259Forecast 190
202510Forecast 190
202511Forecast 180
202512Forecast 1100
20253Forecast 240
20254Forecast 250
20255Forecast 250
20256Forecast 260
20257Forecast 270
20258Forecast 280
20259Forecast 290
202510Forecast 290
202511Forecast 280
202512Forecast 2100

 

Preffered result. This excample is when filtering on forecast 1. The text marked in green color are actual numbers but, but in report apears to be a part of forecast-data.

 

YearPeriodnrPlanAmount
20251Forecast 110
20252Forecast 130
20253Forecast 140
20254Forecast 150
20255Forecast 150
20256Forecast 160
20257Forecast 170
20258Forecast 180
20259Forecast 190
202510Forecast 190
202511Forecast 180
202512Forecast 1100
    
1 ACCEPTED SOLUTION

Hi @Anders1 

 

Power Query will dynamically consolidate all forecasts into a single query with the Plan column . So new forecasts are automatically added with no manual steps or extra tables.

 

Dynamic.png

 

You would automatically have an extra forecast 3 as per below results :

 

Forecast 3.png

 

Financial Data with forecast 3 added :

 

Financial Data with forecast3.png

 

If still an issue ( as I am guessing what your extra forecast looks like )  I suggest send some extra screenshots and further clarifications of what the problem is. I can then have another look.

 

Antonio

View solution in original post

7 REPLIES 7
v-pnaroju-msft
Community Support
Community Support

Hi Anders1,

We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.

If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi Anders1,

We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.

If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Thank you, @Ant_Frifor your response.

 

Hi Anders1,

 

We would like to check if the solution provided by @Ant_Fri has resolved your issue. If you have found an alternative approach, we encourage you to share it with the community to assist others facing similar challenges.

If you found the response helpful, please mark it as the accepted solution and add kudos. This recognition benefits other members seeking solutions to similar queries.

 

Thank you.

Ant_Fri
Resolver I
Resolver I

Hi @Anders1 

 

I suggest the following steps :

 

Duplicate your table as per follows : One duplicate table is “ Actuals  “ , one is “ Forecast  “ and another is “ Forecast 2  “

 

In Forecast :

-Filter out Actuals

-Add a custom column named Joinkey and insert a 1

-Remove all columns except Plan and Joinkey

-In Plan column remove duplicates

 

In Forecast 2 :

-Filter out Actuals

 

In Actuals:

-Filter out Forecast

-Add a custom column named Joinkey and insert a 1

 

New Table : ActualwithForecast

-Merge Actuals to Forecast ( on joinkey > inner join ) to create a table ActualwithForecast

-Expand table

-Keep columns Year, Period,  Amount and Forecast.Plan ( last colum here is from the table you just joined )

-Rename Forecast.Plan to Plan

 

New Table : Merged 2

-Merge ActualwithForecast to Forecast 2   (  in the merge select Year , Period, Plan for both tables ) and select  Left Anti as join kind

-Remove the Expand Table

 

Append  Forecast2 to Merged 2 and you should have the below table which is similar to your preferred result :

 

Forecast.png

 

This is the data under FinancialData :

 

Financial Data.png

 

Hope this helps

Antonio

Thank you for your suggestion, and this would work, but is not a good aproach since my dataset will get 1 new forecast each month, and i then need to manually add one more merge table for each month. And after one eyear i will have 12 of these tables. Maybe a DAX query would be the only answer here?

Hi @Anders1 

 

Power Query will dynamically consolidate all forecasts into a single query with the Plan column . So new forecasts are automatically added with no manual steps or extra tables.

 

Dynamic.png

 

You would automatically have an extra forecast 3 as per below results :

 

Forecast 3.png

 

Financial Data with forecast 3 added :

 

Financial Data with forecast3.png

 

If still an issue ( as I am guessing what your extra forecast looks like )  I suggest send some extra screenshots and further clarifications of what the problem is. I can then have another look.

 

Antonio

lbendlin
Super User
Super User

how do you get from 10 to 110 ?

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors