Forum Discussion
Running Totals with Filtering
- 8 years ago
Hi Tony5,
Please create another table named "Month" including month, there is no ralationship between table Month and your sales table.
1. Create a sclier including Month[month] column.
2. Create a measure to calculate the running total using the formula below.running total = VAR mm=SELECTEDVALUE(Month[Month]) Return CALCULATE(SUM(Test[sales]),FILTER(Test,Test[Month]<=mm))
3. Please see the screenshot, when you click 1, it disply the sum sale of jan, when you click 2, it disply the sum sale of jan+feb. You will get expected result.
picture1
Please download the attachment for more details.
Best Regards,
Angelia
Hi Tony5,
Please create another table named "Month" including month, there is no ralationship between table Month and your sales table.
1. Create a sclier including Month[month] column.
2. Create a measure to calculate the running total using the formula below.
running total = VAR mm=SELECTEDVALUE(Month[Month]) Return CALCULATE(SUM(Test[sales]),FILTER(Test,Test[Month]<=mm))
3. Please see the screenshot, when you click 1, it disply the sum sale of jan, when you click 2, it disply the sum sale of jan+feb. You will get expected result.
picture1
Please download the attachment for more details.
Best Regards,
Angelia