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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
adsam
Frequent Visitor

forecast by customer ratio

Hi Champions, 

 

I have Sales data @ Product, Location, Week & Customer level

and forecast data @ Product, Location, Week level

 

what I want is to get forecast * customer sales ratio . so forecast will also come @ sales level.

In below snapshot yellow highlighted field is required. 

 

Capture.PNG

 

I tried this query but doesn't seems to be working

 

FC by Customer = VAR ProdSls=ADDCOLUMNS(Prod_Mstr,"Prdsls",[Sales])
Return SUMX(ADDCOLUMNS(CROSSJOIN(ProdSls,Location_mstr,Customer),"Sls",[Sales]),DIVIDE([Sls],[Prdsls])*[Forecast])

 

File Link:

 

Capture.PNG

1 ACCEPTED SOLUTION

thanks Ibendlin for your time and help. 

below orange line I wanted

 

I used below query and my issue resolved. 

Forecast by Customer = VAR Allsales=CALCULATE(Sales_Trans[Sales],ALL(Customer),ALL('Calendar'))
                        VAR CusSales=CALCULATE(Sales_Trans[Sales],ALL('Calendar'))
                            Return DIVIDE(CusSales,Allsales)*[Forecast]

 

Capture.PNG

 

File link:

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Thank you for the pbix. Please see attached for a sample implementation.

thanks for your reply, but still not solved. customer forecast data still @ total level, and customer forecast coming till sales horizon, means till October, 

 

current forecast data is @ Product & location level, what I want is to find customer sales % over selected location and product, then multiply forecast to that % in that way I can get forecast @ customer level. 

 

Capture.PNG

That's what I provided on page 2? Are you looking for an extrapolation?

thanks Ibendlin for your time and help. 

below orange line I wanted

 

I used below query and my issue resolved. 

Forecast by Customer = VAR Allsales=CALCULATE(Sales_Trans[Sales],ALL(Customer),ALL('Calendar'))
                        VAR CusSales=CALCULATE(Sales_Trans[Sales],ALL('Calendar'))
                            Return DIVIDE(CusSales,Allsales)*[Forecast]

 

Capture.PNG

 

File link:

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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