Forum Discussion
learner03
4 years agoPost Partisan
Time difference between Today and first timestamp
I have 2 Table- Receipt Jobs Receipt ID 123 345 567 789 and Receipt_lines Recepit ID Item code timestamp 123 abc 7/02/2022 6:59 345 def ...
- Anonymous4 years ago
Hi learner03 ,
Please try:
Count = var _first=CALCULATE(MIN('Receipt_lines'[timestamp]),ALLEXCEPT(Receipt_lines,Receipt_lines[Recepit ID])) return CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar', [Date]>=_first && [Date]<=NOW()&& [Flag]=1 ))Measure = CALCULATE([Count], FILTER('Receipt_lines',[Recepit ID]=MAX('Receipt Jobs'[Receipt ID])))Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi learner03 ,
Please try:
Count =
var _first=CALCULATE(MIN('Receipt_lines'[timestamp]),ALLEXCEPT(Receipt_lines,Receipt_lines[Recepit ID]))
return CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar', [Date]>=_first && [Date]<=NOW()&& [Flag]=1 ))Measure = CALCULATE([Count], FILTER('Receipt_lines',[Recepit ID]=MAX('Receipt Jobs'[Receipt ID])))
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.