cancel
Showing results for
Did you mean: Frequent Visitor

## SUM/Substract

Hey, so here is my issue. I have a table with for each year the client rejected after a certain step. Knowing that the total application is given on the last column, i would like to have in remaining the amount remaining after each step. But for now I just achieve to substract the total with the one rejected for one step, where for example, for step 2 of 2017 i expect the remaining to be equal to :  Total - rejcted at step 1 - rejected at step2 And so on for each step, knowing that it as to be done separatly for each year.

1 ACCEPTED SOLUTION  Community Support

Hi

1. Click Edit Queries-> Add Column-> Index Column

2. Create a calculate column running total using DAX formula below:

```Running Total =
CALCULATE (
SUM ( Table1[Rejected after step] ),
FILTER (
Table1,
Table1[Index] <= EARLIER ( Table1[Index] )
&& Table1[Year] = EARLIER ( Table1[Year] )
)
)
```

3. Achieve the remaining after each step

`Remaining after step = MAX(Table1[Total Applications]) + MAX(Table1[Running Total])` Regards,

Jimmy Tao  Community Support

Hi

1. Click Edit Queries-> Add Column-> Index Column

2. Create a calculate column running total using DAX formula below:

```Running Total =
CALCULATE (
SUM ( Table1[Rejected after step] ),
FILTER (
Table1,
Table1[Index] <= EARLIER ( Table1[Index] )
&& Table1[Year] = EARLIER ( Table1[Year] )
)
)
```

3. Achieve the remaining after each step

`Remaining after step = MAX(Table1[Total Applications]) + MAX(Table1[Running Total])` Regards,

Jimmy Tao 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. #### Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps #### Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer. Top Solution Authors
Top Kudoed Authors
Users online (1,846)