Forum Discussion
iabramson
1 year agoFrequent Visitor
Running Total For Runs per year
How do I create a calculated text column in my data set of running total for the year based on run type and year. Basically looking for a column that is a unique identifier to use in a relationship w...
- 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
ryan_mayu
1 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?
iabramson
1 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