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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rachaelwalker
Resolver III
Resolver III

If value is blank, find last record and multiple it by 1.035 and apply to all preceding blanks

Every two weeks we capture forecasted revenue to determine accuracy but we also use it to forecast out until end of year. I am looking for a formula that calculates a projected revenue for any date that is not yet captured by finding the last record value and multiplying it by 1.035 and to continue to apply it to all rows. This is very easy to do in excel but I cannot wrap my head around it in power bi.

 

I have two tables 'Forecast Calendar' with [Date]. I have a 'Forecast Audit' table that has the [Date] & [Projected Revenue]. I added index columns to both thinking this may lead me in the right direction. I also merged the tables in power query.

 

dataset: https://docs.google.com/spreadsheets/d/1Xghbz_vf8VXOcMJCT2zFZu1ekpnLhzQvG4cSDsfBDEE/edit?usp=sharing

here is a snippet as well. 

rachaelwalker_3-1711120531659.png

 

Expected results (highlighted yellow. I want it to show the actual $$ value but wanted to show the excel formula I would use if in excel)

rachaelwalker_2-1711120356906.png

*ignore the date format

 

 

1 ACCEPTED SOLUTION

try the code in M language

Screenshot_3.pngScreenshot_4.png

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the file with the 2 original tables (not the one you merged in Power Query)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Screenshot_2.png

I need it to be accumulating so I need 4/12 date to be (53,360,016.83 * 1.5) and so on. Here are the values I am looking for. Thank you for taking the time to help!

 

rachaelwalker_1-1711132196151.png

 

 

try the code in M language

Screenshot_3.pngScreenshot_4.png

Thank you so much this worked perfectly!!

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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