Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm struggling with this. I want to know the percentage of parts that fall within five days of the difference between the enter date and the stock date. This must be a percentage of the total number. If there is no stock date yet, it may not be included in the calculation.
This is my data:
Enter_date | Stock_date | Days |
18-Feb-22 | 21-Feb-22 | 3 |
18-Feb-22 | 21-Feb-22 | 3 |
18-Feb-22 | 22-Feb-22 | 4 |
18-Feb-22 | 22-Feb-22 | 4 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 21-Feb-22 | 4 |
17-Feb-22 | 28-Feb-22 | 11 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 23-Feb-22 | 6 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 28-Feb-22 | 11 |
17-Feb-22 | 28-Feb-22 | 11 |
17-Feb-22 | 23-Feb-22 | 6 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 28-Feb-22 | 11 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 21-Feb-22 | 4 |
17-Feb-22 | 21-Feb-22 | 4 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 24-Feb-22 | 7 |
17-Feb-22 | 23-Feb-22 | 6 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 23-Feb-22 | 6 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 21-Feb-22 | 4 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 25-Feb-22 | 8 |
17-Feb-22 | 23-Feb-22 | 6 |
17-Feb-22 | 17-Feb-22 | 0 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 21-Feb-22 | 4 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 22-Feb-22 | 5 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 18-Feb-22 | 1 |
17-Feb-22 | 25-Feb-22 | 8 |
16-Feb-22 | 16-Feb-22 | 0 |
16-Feb-22 | 24-Feb-22 | 8 |
16-Feb-22 | 17-Feb-22 | 1 |
In this example, the number of lines is 60. The question is, what is the percentage of the total of the days that fall between 0 and 5 days?
There are 60 days in the example and 47 days are between 0 and 5 days. The percentage I'm looking for is (47/60)*100= 78.33%.
Those 60 lines can also be 1000 or 10000. That can differ per day when we run these reports.
Can someone help me out?
Thanks!
Regards
Solved! Go to Solution.
Hi, @WLFRD
You can try the following methods.
Measure:
Percentage =
Var _1=CALCULATE(COUNT('Table'[Days]),FILTER('Table',[Days]<=5&&[Days]>=0))
Var _2=COUNT('Table'[Days])
Return
DIVIDE(_1,_2)
Is this the result you were expecting?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @WLFRD
You can try the following methods.
Measure:
Percentage =
Var _1=CALCULATE(COUNT('Table'[Days]),FILTER('Table',[Days]<=5&&[Days]>=0))
Var _2=COUNT('Table'[Days])
Return
DIVIDE(_1,_2)
Is this the result you were expecting?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
89 | |
82 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |