Forum Discussion
Addition in powerBI
I Want to calculate the current day backlog ,so need to do addition in the below-mentioned way.
Since I am new in Power BI,i searched alot but not finding solution. can someone tell me how to do this in power BI through measure or DAX or any possible way.
I want result like column 2 which adds previous value+ current value
| Column 1 | Column 2 | ||||||
| 10 | 10 | ||||||
| 20 | 30(10+20) | ||||||
| 15 | 45(30+15) | ||||||
| 25 | 70(45+25) | ||||||
3 Replies
- vivran22
Community Champion
Hello rohitchouhan ,
You may try this:
Running Total = VAR _Current = 'Table'[Index] VAR _Filter = FILTER( 'Table', 'Table'[Index] <= _Current) VAR _Sum = CALCULATE( SUM('Table'[Column 1]), _Filter) RETURN _SumFor this formula to work as calculated column, you need a column as index. Either you can use a already existing column in your table which has a serial order (it can be a date column also), or you can add Index column using Power Query:
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter - AnonymousNot applicable
if you already have a date column in your dataset, you can try this,
cummulative sum = CALCULATE(SUM('Table'[amount]),FILTER('Table','Table'[date]<=EARLIER('Table'[date]))) - vivran22
Community Champion
I just noticed that you like my reply is there anything I am missing to mark that as a solution?
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter