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
amangabeira
Regular Visitor

Future forecast based on historical average

amangabeira_1-1656586398129.png

 


I made a new example and I try to explain step by step:

  1. my data is the Sales and Costs columns
  2. If I divide the costs by the sales I will get the ratio between this two

The main objective is to forecast the costs of the rest of the year based on the sales that is already in sales column.
I would like to get the average ratio between this two colunmns and use this average to multipli by the future sales.
In the picture I foung the average as 11.86% (jan to apr data)
Then I use DAX to get the real Ratio when I have the costs or the average if blank.

amangabeira_2-1656586397561.png

 

 Then I would use this colum and just multipli by the sales column.

the problem is that when it calculates the Trimester ou Annual my dax is wrong because in scope of trimester it isn't blank so for the second trimester it calculates the respective costs (15) by the total sales of the same period (330) and the final ratio is 4.55%. For the whole year it also not blank and calculates total costs of the year (50) by the total sales of the year (1,410) and the final ratio is 3.55%.

amangabeira_3-1656586398241.png

 

The correct for the second trimester would be the average of 12.5% and the average projected for may and june (11.86% each).

The disired result is:

amangabeira_4-1656586463627.png

PBIX:

https://1drv.ms/u/s!Assv7jv6TeY9g5Y0uldq4CCAsPRgqQ?e=rhB0GG

 

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @amangabeira ,

 

Excuse me, are you referring to the yellow-labeled data, the current three-month data, not the historical average?

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Now I edited the post to try to explain better. Also put a link to the PBIX file. I appreciate the help

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.