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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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