Forum Discussion
Running total to date
- 6 years ago
If the date increases daily, you could create calculated columns below:
earlier = CALCULATE ( SUM ( 'Table'[Running Value] ), FILTER ( 'Table', 'Table'[Country] = EARLIER ( 'Table'[Country] ) && 'Table'[Date] = EARLIER ( 'Table'[Date] ) - 1 ) ) daily total = [Running Value]-[earlier]As tested, if i understand you correctly, your second visual has some wrong data due to teh calculation rule.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 6 years ago
Thank you so much, it work out to perfection.
- 6 years ago
- 6 years ago
This solution was created using Power Query as you have posted your question in PQ section, the script dose Include the M code in Added Column step of the script.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
I do not understand. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Greg,
I have the below columes- Country/ Date/ Running value.... I wanted create a new column Daily figure, which will be the total value of that day.
| Country | Date | Running Value | Daily Figure(need to be calculated) |
| Japan | 1/20/20 | 1 | 1 |
| India | 1/20/20 | 5 | 5 |
| Japan | 1/21/20 | 3 | 2 |
| India | 1/21/20 | 5 | 0 |
| Japan | 1/22/20 | 8 | 5 |