Forum Discussion
Filter Sales by a date
- 8 years ago
Awesome, Thanks Yggdrasill
I made a couple of changes and seems to give the correct result. Two references to the sales table and the other two are to the employee table.
3 month revenue =
CALCULATE(sum(Sales[Amount]),
DATESBETWEEN(
Sales[Date],
FIRSTDATE(Employee[Start Date]),
eomonth(FIRSTDATE(Employee[Start Date]),2)
)
)Thanks
Nick
Try DATESBETWEEN()
- nick90008 years agoFrequent Visitor
thanks Yggdrasill, I couldn't get DATESBETWEEN to work
- Yggdrasill8 years agoResponsive Resident
I tried your scenario
This is what you need
3M from startdate = CALCULATE ( SUM ( Table1[Amount] ), DATESBETWEEN ( Table1[start date], FIRSTDATE ( Table1[start date] ), DATEADD ( FIRSTDATE ( Table1[start date] ), 3, MONTH ) ) )Then create a visual table and insert employee and then this measure to get this
employee & 3 month sale measure
- nick90008 years agoFrequent Visitor
Awesome, Thanks Yggdrasill
I made a couple of changes and seems to give the correct result. Two references to the sales table and the other two are to the employee table.
3 month revenue =
CALCULATE(sum(Sales[Amount]),
DATESBETWEEN(
Sales[Date],
FIRSTDATE(Employee[Start Date]),
eomonth(FIRSTDATE(Employee[Start Date]),2)
)
)Thanks
Nick