Forum Discussion
FawadRehman
10 years agoHelper I
Running Total - DAX
I need help. I am looking for same solution http://community.powerbi.com/t5/Desktop/DAX-Running-total-by-another-column/m-p/10512#M2189 but somehow its not working for me. RunningTotal...
- 10 years ago
FawadRehman This should work... Let me know.
Running Total COLUMN = CALCULATE ( SUM ( TabelForecast[Forecast] ), ALLEXCEPT ( TabelForecast, TabelForecast[M#] ), TabelForecast[MonthYear] <= EARLIER ( TabelForecast[MonthYear] ) )
FawadRehman
10 years agoHelper I
| Project Name | M# | MonthYear | Forecast | RunningTotal |
| KR | 0779930-AA | December, 2015 | $ 600,000.00 | $ 600,000.00 |
| KR | 0779930-AA | January, 2016 | $ 865,000.00 | $ 1,465,000.00 |
| KR | 0779930-AA | March, 2016 | $ 1,500,000.00 | $ 2,965,000.00 |
| KR | 0779930-AA | August, 2016 | $ 500,000.00 | $ 4,065,000.00 |
| KR | 10779930-AA | July, 2016 | $ 600,000.00 | $ 3,565,000.00 |
| KR | 107799DD | February, 2016 | $ 1,100,000.00 | $ 1,100,000.00 |
| KR | 107799DD | April, 2016 | $ 10,000.00 | $ 1,110,000.00 |
| KR | 107799DD | May, 2016 | $ 2,500,000.00 | $ 3,610,000.00 |
| MP | DO6000 | December, 2015 | $ 1,000,000.00 | $ 1,000,000.00 |
| MP | DO6000 | January, 2016 | $ 3,000,000.00 | $ 4,000,000.00 |
| MP | DO6000 | February, 2016 | $ 3,100,000.00 | $ 7,100,000.00 |
| JR | R16ID80004 | December, 2015 | $ 2,300,000.00 | $ 2,300,000.00 |
| JR | R16ID80004 | January, 2016 | $ 2,500,000.00 | $ 4,800,000.00 |
| JR | R16ID80004 | February, 2016 | $ 3,300,000.00 | $ 8,100,000.00 |
| JR | R16ID80004 | March, 2016 | $ 4,000,000.00 | $ 12,100,000.00 |
| MP | RAM15IE10101 | October, 2015 | $ 500,000.00 | $ 500,000.00 |
Here is the table. No its to summary table, just normal table and i am add one new calculated column "Running table". Btw, projects could go 5 years or more so Max date funtion is necessary.
Sean
10 years agoCommunity Champion
FawadRehman Why don't you want to do the Running Total in the new Merged Table?
- FawadRehman10 years agoHelper I
Sean other table is coming from other source which has almost same columns and i want to join with M# ,MonthYear & Project Name.
- FawadRehman10 years agoHelper I
Sean any update sir?
- Sean10 years agoCommunity Champion
FawadRehman This should work... Let me know.
Running Total COLUMN = CALCULATE ( SUM ( TabelForecast[Forecast] ), ALLEXCEPT ( TabelForecast, TabelForecast[M#] ), TabelForecast[MonthYear] <= EARLIER ( TabelForecast[MonthYear] ) )- FawadRehman10 years agoHelper I
Working like a charm. Thank You. btw do you know line break in text box?