Forum Discussion
samotfrt
2 years agoFrequent Visitor
Sum values if date is between two dates and other filter
I have the following tables user_list media_id user_id start_date finish_date min_day 1 1 01/01/2022 02/01/2023 8.2 3 1 31/12/2022 01/01/2023 45.0 2 2 03/01/2023 0...
- Anonymous2 years ago
Hi samotfrt
There are some errors in your data, please check them yourself.
Here is the test after I changed the data:total_hours = CALCULATE(SUM(user_list[min_day]), FILTER(user_list, [finish_date] >= SELECTEDVALUE('Calendar'[Date]) && 'user_list'[start_date] <= SELECTEDVALUE('Calendar'[Date])))Output:
Is this the result you expect?
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi samotfrt
There are some errors in your data, please check them yourself.
Here is the test after I changed the data:
total_hours = CALCULATE(SUM(user_list[min_day]), FILTER(user_list, [finish_date] >= SELECTEDVALUE('Calendar'[Date]) && 'user_list'[start_date] <= SELECTEDVALUE('Calendar'[Date])))
Output:
Is this the result you expect?
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.