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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AlexandrLosenok
Frequent Visitor

Value in cell calculated on previous cell value


MêsEnt0M1M2M3M4M5M6M7M8M9M10M11M12M13M14M15M16M17M18M19M20M21M22M23M24M+
01/01/20238379476737452727262126212324192322201719191716161619
01/02/20237268714445314024272620252123241923212017191917161619
01/03/20235857615926402636232426202321222219222119171719171619
01/04/20235248495740243925362223261922212122192221191716191719
01/05/20238567674729392223252521202318192121201920201917161619
01/06/202377                         
01/07/202379                         
01/08/202362                         
01/09/202350                         
01/10/202350                         
01/11/202374                         
01/12/202335                         


Hi everyone!

I have the next table (example is above. First row has Headers)

The table represents number of a product units by number of months it stays in stock. So ENT shows us how much product comes into the stock. 0M - how much units remains before the end of the first month, 1M - how much units remains in stock more than 1 month but less then 2; 2M - more then 2 months but less then 3 etc.
Values in the ENT column are defined. COEF - shows the proportion of the group that will remains in stock one more month.

The values up to previous month (Columns '0M', '1M' etc) are filled manually in the source.  Values for other months must be calculated like this:  Value of the previous month * coef.  So the June value is calculated on the base of the May value, the July value is calculated on the base of calculated June value, etc.
Coef = SUM(Column n+1[2st row : actual month row] SUM(Column n [1st row : actual month - 1 row])

Here is an exemple of desired result in excel (only the values must be calculated for each month until the end of the year)
Also Sum function will be flexivel such the the bottom cell of the interval will be linked to actual month (i.e. instead of =SUM(C2:C5) there will be something like = CALCULATE(SUM(C), FILTER(Datetable, Datetable[year] = year_now &&  Datetable[month] = month_now - 1))

AlexandrLosenok_0-1687181260202.png

 

 

How do I create a measure or a column that helps me with this?
 

6 REPLIES 6
Fechner
Frequent Visitor

I unsterstand how one could calculate the values for the following month but could you go into more detail on how to calculate the values for the rest of the year when the Values from C7 to C13 are missing in your exspected output?

In this case we are using the same COEF for the rest of the year. Such as for August we will multiply forecasted value for July and COEF that calculated in actual month. In other words we consider that the COEF will remain the same for the rest of the year.

So you are basically leaving the rest of the 0M Column blank and calculate everything using C16 and C6. Is that right?

Not exactly. The column C for blank cells is calculated using the values from the column B and Fixed coefficient. I have made alterations in the post to clarify this and some more explanations.
Then we use real value from previous month in C (C6) to calculate forecatsed value in D in the next month (D7), also we using forecated value for the next month in C(C7) to calculate forecasted value in D in two months (D8) etc. 

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

@lbendlin thank you for recomendations. I have corrected the post.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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