Forum Discussion
Running Total For Runs per year
- 1 year ago
You don't have the same date in both tables, so you don't need to create relationship between tables.
you can try this
Column =var _count1=countx(FILTER('Future runs','Future runs'[Date]<=EARLIER('Future runs'[Date])&&'Future runs'[Run]=EARLIER('Future runs'[Run])&&year('Future runs'[Date])=year(EARLIER('Future runs'[Date]))),'Future runs'[Date])var _count2=countx(FILTER('Table','Table'[Date]<='Future runs'[Date]&&'Table'[Run Type]='Future runs'[Run]&&year('Table'[Date])=year('Future runs'[Date])),'Table'[Date])return right(year('Future runs'[Date]),2)&'Future runs'[Run]&right("0"&(_count1+_count2),2)pls see the attachment below
you can try this to create a column
That worked thank you, now how would i link this to a second data set / table of "future runs" (with a relationship by date between both tables ) that would continue to build the run total count off the previous past count ?
| Date | Run | desired result |
| 12/21/2024 | A | 24A04 |
| 12/23/2024 | C | 24C02 |
| 12/25/2024 | C | 24C03 |
| 12/30/2024 | B | 24B02 |
- ryan_mayu1 year agoSuper User
why the first date is A04? I think in your original table, we already have 24A07, why the date is not 24A08?
- iabramson1 year agoFrequent Visitor
Sorry I changed the data to line up with the screen shot you sent. Ether way trying to get the count to continue going in a second dataset of future scheduled or planned runs if that makes sense ?
- ryan_mayu1 year agoSuper User
You don't have the same date in both tables, so you don't need to create relationship between tables.
you can try this
Column =var _count1=countx(FILTER('Future runs','Future runs'[Date]<=EARLIER('Future runs'[Date])&&'Future runs'[Run]=EARLIER('Future runs'[Run])&&year('Future runs'[Date])=year(EARLIER('Future runs'[Date]))),'Future runs'[Date])var _count2=countx(FILTER('Table','Table'[Date]<='Future runs'[Date]&&'Table'[Run Type]='Future runs'[Run]&&year('Table'[Date])=year('Future runs'[Date])),'Table'[Date])return right(year('Future runs'[Date]),2)&'Future runs'[Run]&right("0"&(_count1+_count2),2)pls see the attachment below