Forum Discussion
Abhaykumar
8 years agoMicrosoft Employee
Sum over specific range
I have a table Jobs: And another table DaySeries (for X-Axis): There is many to one relation...
- 8 years ago
Hi Abhaykumar,
Based on my test, you should be able to use the formula below to create a measure to get the total number jobs in previous 10 days (including that day) in your scenario. :smileyhappy:
Measure = VAR currentDay = MAX ( DaySeries[Days] ) RETURN CALCULATE ( SUM ( Jobs[Jobs] ), FILTER ( ALL ( DaySeries ), DaySeries[Days] > currentDay - 10 && DaySeries[Days] <= currentDay ) )Regards
v-ljerr-msft
8 years agoMicrosoft Employee
Hi Abhaykumar,
Based on my test, you should be able to use the formula below to create a measure to get the total number jobs in previous 10 days (including that day) in your scenario. :smileyhappy:
Measure =
VAR currentDay =
MAX ( DaySeries[Days] )
RETURN
CALCULATE (
SUM ( Jobs[Jobs] ),
FILTER (
ALL ( DaySeries ),
DaySeries[Days]
> currentDay - 10
&& DaySeries[Days] <= currentDay
)
)
Regards
Abhaykumar
8 years agoMicrosoft Employee
Thanks v-ljerr-msft, that worked for me!.