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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Need help to create some dax forecasting measures

Hi - I appreciate some help to create some dax forecast formulas based on the following excel example tables below.  This sample data contains year 2022 actual Purchase and Sales Sold data. And Stock Balance figure is computed as Stock Balance from previous month + Purchase - Sales. 

 

Purchase Rates and Sold Rates are computed as a % of Stock Balance - and this is used as a Rate Table to compute Forecast Purchase and Sold for year 2023.  

 

I am stuck on creating a working dax formulas for Forecast Purchase, Forecast Sold and Forecast Stock Balance.  It is  easy to do this on Excel - but with my limited Power BI knowledge - it is a challenge.

 

Stock HistoryPurchase DataSold DataStock Balance (calculated Balance Beginning of Month + Purchase - Sales for the month)Purchase Rate (Purchase / Stock Balance)Sold Rate (Sold /Subscriber Balance) 
Jan-2230,18329,905659,2354.58%4.54% 
Feb-2227,31724,941661,6114.13%3.77% 
Mar-2236,48929,922668,1785.46%4.48% 
Apr-2226,28821,466673,0003.91%3.19% 
May-2228,91124,311677,6004.27%3.59% 
Jun-2227,95825,105680,4534.11%3.69% 
Jul-2228,75847,759661,4524.35%7.22% 
Aug-2228,01949,386640,0854.38%7.72% 
Sep-2236,89852,494624,4895.91%8.41% 
Oct-2243,18952,683614,9957.02%8.57% 
Nov-2235,46963,773586,6916.05%10.87% 
Dec-2237,46161,155562,9976.65%10.86% 
       
       
Stock ForecastForecast Purchase (Purchase rate * Previous Month Stock Balance)Forecast Sold (Sold rate * Previous Month Stock Balance)Forecast Stock Balance (carry forward actual Dec 2022 stock balance)Purchase Rate (use monthly 2022 rates above)Sold Rate (use monthly 2022 rates above)Previous Month Stock Balance
Jan-2325,77725,539563,2344.58%4.54%562,997
Feb-2323,25521,232565,2574.13%3.77%563,234
Mar-2330,86925,313570,8135.46%4.48%565,257
Apr-2322,29618,207574,9023.91%3.19%570,813
May-2324,52920,626578,8054.27%3.59%574,902
Jun-2323,78221,355581,2324.11%3.69%578,805
Jul-2325,27041,967564,5354.35%7.22%581,232
Aug-2324,71243,557545,6904.38%7.72%564,535
Sep-2332,24245,870532,0625.91%8.41%545,690
Oct-2337,36545,579523,8497.02%8.57%532,062
Nov-2331,67056,942498,5766.05%10.87%523,849
Dec-2333,17554,157477,5946.65%10.86%498,576
2 REPLIES 2
some_bih
Super User
Super User

Hi @Anonymous I am keen to help you, for start

amount 

659,235

is calculated like some balance X + purc - sold (this is ok) but where is X, openning balance for real start of your calculation? 

PS I am on holiday, so my answers could be lateeeee 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Anonymous
Not applicable

 Hi - many thanks for helping out. There is actually a 3 month prior to year 2022 for actual purchases - so the last three months of year 2021 moving on year 2022 looks like the snapshot below. Actual sales starts year 2022 - this is why i want to use year 2022 rates to predict 2023 forecasts : 

WKBILearner_0-1690200244647.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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