Forum Discussion
pal95
Helper III
4 years agoCumulative Line Chart for Mileage Register
Hi, I have a huge 'timesheet' like dataset where every employee registers the car they used and how many miles they made: It generates a nice line chart where I can see mileage change...
- 4 years ago
pal95 , Using a date table in measure and visual axis
Cumm = CALCULATE(SUM(Table[Miles]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
or
Cumm = CALCULATE(SUM(Table[Miles]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))
pal95
Helper III
4 years agoHi, just created a sample for you:
| Date | Registration | Miles |
| 1/17/2022 | A | 21 |
| 1/11/2022 | A | 3 |
| 1/12/2022 | A | 71 |
| 1/17/2022 | A | 82 |
| 1/5/2022 | B | 85 |
| 1/6/2022 | A | 87 |
| 1/17/2022 | B | 23 |
| 1/8/2022 | B | 44 |
| 1/9/2022 | B | 47 |
| 1/4/2022 | B | 54 |
| 1/11/2022 | C | 16 |
| 1/12/2022 | C | 54 |
| 1/17/2022 | C | 96 |
| 1/4/2022 | A | 29 |
| 1/15/2022 | C | 99 |
| 1/16/2022 | B | 13 |
| 1/17/2022 | B | 22 |
| 1/4/2022 | C | 52 |
| 2/19/2022 | C | 24 |
| 1/20/2022 | B | 23 |
| 1/21/2022 | A | 93 |
| 2/17/2022 | C | 59 |
| 1/23/2022 | C | 56 |
| 1/24/2022 | A | 80 |
| 1/25/2022 | C | 50 |
Best regards,
- amitchandak4 years ago
Super User
pal95 , Using a date table in measure and visual axis
Cumm = CALCULATE(SUM(Table[Miles]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
or
Cumm = CALCULATE(SUM(Table[Miles]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))