Forum Discussion
Count days with filters
- 2 years ago
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
I've made a sample here:
https://drive.google.com/file/d/1fDsLFh9XHxx2HZ6ZfjjV6HbYOA8J28t6/view?usp=sharing
Table on the left is the type of table I'm interested in making, where the day count should be a measure next to inventory.
Table in the middle is an example of an item, where the deadstock day count should be 13 (days with Yes in Deadstock column).
Table on the right is another example, where we have two periods with Deadstock = Yes. The count should only count if the current status is Deadstock = Yes, and should only count the current period, which means from the 13th to the 23rd = 11 days.