How can i calculate running total by category sorted by Date.

I know there is option available by using running_total(Amount) from calculation but i need to show by each category and date. Amount should be reset by change of category.

cat | amount | Date | RunningTotal

1 | 10 | Day1 | 10

1 | 10 | Day2 | 20

1 | 10 | Day3 | 30

2 | 10 | Day1 | 10

2 | 10 | Day2 | 20

2 | 10 | Day3 | 30

2 | 10 | Day4 | 40

3 | 10 | Day1 | 10