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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to calculate sales forecast based on old and new sales price

I have a forecast for my items. Item one has a forecast for period 1 through period 12. The sales price is $15 for periods 1-7 and a new sales price, $13.50, goes in to effect period 8-12.

 

How do I calculate total sales based on the sales prices in the appropriate period?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@dearwatson I was able to solve! I need to create a sales table and pass the item master and calendar reference through that table and then create a unique key in the sales price table and the forecast to create a 1 to many (technically it could have a 1:1 and cross filter both, but I only want the forecast to change not the other way around). 

 

Thanks!

Andrew

 

Sales Price PBI Solution.PNG

View solution in original post

4 REPLIES 4
dearwatson
Responsive Resident
Responsive Resident

Hi a_mayes

 

basically speaking you will need to build a table which for any given date and item gives you the forecast and the price.

e.g.

Date | Forecast | Price | Item

 

then create a SUMX iterator that calculates the total over this table.

 

if you supply some sample data I will show you how to calculate this with your structure.

 

Cheers

Greg

 

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte
Anonymous
Not applicable

Thanks for the response @dearwatson . We use a 4-4-5 financial calendar so I have a date table setup instead of using PBI's. Below is how my table looks (The item name and sales price are a part of the table but I could not get it in to this view all together. I unpivot the 12 columns so that the column headers are now one column of dates.

 

Item 1 $19.09

Item 2 $36.13

Item 3 $18.17

 

Sales Price PBI Help.PNG

 

After unpivoting:

 

Item Name   Sales Price   Forecast      date

Item 1              19.08          192          1/1/2019

Item 1              19.08          96            1/27/2019

Item 1              19.08          96            2/24/2019

Item 1              19.08          96            3/31/2019

Item 1              19.08          192          4/28/2019

etc.

 

Would I be able to accomplish this by setting up a different table with only sales prices and then unpivoting similar to above to get the sales price for the item in to the same column with another column for dates?

 

Thanks,

Andrew

 

Anonymous
Not applicable

@dearwatson I was able to solve! I need to create a sales table and pass the item master and calendar reference through that table and then create a unique key in the sales price table and the forecast to create a 1 to many (technically it could have a 1:1 and cross filter both, but I only want the forecast to change not the other way around). 

 

Thanks!

Andrew

 

Sales Price PBI Solution.PNG

v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

You could forecast sales with Power BI, please learn how to work:

Data Forecasting and Analytics with Power BI Desktop

Forecasting in Power BI

How to forecast sales with Power BI 

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.