cancel
Showing results for
Did you mean:
New Member

## How to sum value in next column

I want to calculate about how long that initial order will be ran out of stock

and this is sample of current data (M is sales of each month),

column "Month" is total month until stock ran out (I need this column)

Currently, i can write "if" formula like sample below, but in actual data i have around 36 months so it too long

Month = if(Sheet1[Initial order]-Sheet1[M1]<=0,1,
if(Sheet1[Initial order]-(Sheet1[M1]+Sheet1[M2])<=0,2,
if(Sheet1[Initial order]-(Sheet1[M1]+Sheet1[M2]+Sheet1[M3])<=0,3,
if(Sheet1[Initial order]-(Sheet1[M1]+Sheet1[M2]+Sheet1[M3]+Sheet1[M4])<=0,4,...........
Microsoft

Hello,

It looks like a question concerning DAX. If so, I am afraid that it is out of our expertise therefore, it is better to ask in appropriate threads: this one, or another one.

Kind Regards,

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.