Forum Discussion
data filtering
- 9 years ago
hey danrmcallister,
Thanks for your answer, I think it is good, just little bit complicated. Someone helped me in my other post, and it seems like that it's working, it's simpler a little bit than your code, take a look at it: https://community.powerbi.com/t5/Desktop/filtering-days/m-p/128948#M54799
This might be overkill, but give this a shot:
Daily Hours per Worker Not Holiday = if(
Calculate(
Sum(Summary[Working Time (Hours)]),
Filter(Summary,Summary[Technician] = Earlier( Summary[Technician] )
),
Filter(Summary,Summary[Posting Date].[Date] = Earlier(Summary[Posting Date].[Date])
)) > 1,
Calculate(
Sum(Summary[Working Time (Hours)]),
Filter(Summary,Summary[Technician] = Earlier( Summary[Technician] )
),
Filter(Summary,Summary[Posting Date].[Date] = Earlier(Summary[Posting Date].[Date])
)),
0
)Essentially it's saying "If the sum of worked hours for this technician on this date >1, give this value, else give 0". If you look at the numbers in your full table where a worker has submitted multiple orders, the sum will repeat. So I'm not sure we're quite there yet... seems like you would need another table to pull summary data into by date/technician. Let me know what you think.
hey danrmcallister,
Thanks for your answer, I think it is good, just little bit complicated. Someone helped me in my other post, and it seems like that it's working, it's simpler a little bit than your code, take a look at it: https://community.powerbi.com/t5/Desktop/filtering-days/m-p/128948#M54799
- danrmcallister9 years agoResolver II
Makes sense, thanks for the link!