Forum Discussion
Error with Daily Average Days Open Measure
I'm currently using this measure to calculate the average days open for records that were open based on any given date. The measure is working for the past few months of data but I am finding some errors when looking further into the past. Where the data should be going up by 1 for each passing day that records aren't closed or opened, it is showing static values.
Here is the measure I am using:
| Record ID# | Date Created | DateClosed |
| 3189 | 8/19/2019 | 3/31/2020 |
| 3188 | 7/9/2019 | 2/26/2020 |
| 3186 | 6/19/2019 | 3/3/2020 |
| 3184 | 6/12/2019 | 3/31/2020 |
| 3183 | 6/7/2019 | 3/11/2020 |
| 3181 | 5/30/2019 | 3/6/2020 |
| 3179 | 5/29/2019 | 3/3/2020 |
| 3178 | 5/29/2019 | 9/13/2019 |
| 3176 | 5/21/2019 | 3/3/2020 |
| 3174 | 4/29/2019 | 8/7/2019 |
| 3172 | 4/17/2019 | 12/12/2019 |
| 3171 | 4/9/2019 | 3/4/2020 |
| 3170 | 4/2/2019 | 11/4/2019 |
| 3169 | 3/27/2019 | 11/5/2019 |
| 3168 | 3/22/2019 | 11/13/2019 |
| 3166 | 3/4/2019 | 12/6/2019 |
| 3165 | 2/27/2019 | 9/13/2019 |
| 3163 | 2/12/2019 | 11/12/2019 |
| 3162 | 2/12/2019 | 11/5/2019 |
| 3161 | 2/12/2019 | 12/6/2019 |
| 3160 | 2/12/2019 | 10/25/2019 |
| 3159 | 2/12/2019 | 10/24/2019 |
| 3158 | 2/12/2019 | 10/24/2019 |
| 3157 | 2/11/2019 | 10/24/2019 |
| 3156 | 2/5/2019 | 11/13/2019 |
| 3154 | 1/17/2019 | 11/11/2019 |
| 3152 | 11/26/2018 | 11/25/2019 |
| 3153 | 11/26/2018 | 11/12/2019 |
| 3151 | 11/26/2018 | 11/11/2019 |
| 3150 | 11/21/2018 | 8/23/2019 |
| 3128 | 9/25/2018 | 9/6/2019 |
| 3102 | 12/20/2017 | 11/11/2019 |
And these are the results I am getting, vs the results I should be getting based out of excel:
| Date | PowerBI | Excel |
| 7/2/2019 | 280.4 | 132.3333 |
| 7/3/2019 | 280.4 | 133.3333 |
| 7/4/2019 | 280.4 | 134.3333 |
| 7/5/2019 | 280.4 | 135.3333 |
| 7/6/2019 | 280.4 | 136.3333 |
| 7/7/2019 | 280.4 | 137.3333 |
| 7/8/2019 | 280.4 | 138.3333 |
| 7/9/2019 | 278.8387 | 139.3333 |
| 7/10/2019 | 278.8387 | 135.8387 |
| 7/11/2019 | 278.8387 | 136.8387 |
| 7/12/2019 | 278.8387 | 137.8387 |
| 7/13/2019 | 278.8387 | 138.8387 |
| 7/14/2019 | 278.8387 | 139.8387 |
| 7/15/2019 | 278.8387 | 140.8387 |
| 7/16/2019 | 278.8387 | 141.8387 |
| 7/17/2019 | 278.8387 | 142.8387 |
| 7/18/2019 | 278.8387 | 143.8387 |
| 7/19/2019 | 278.8387 | 144.8387 |
| 7/20/2019 | 278.8387 | 145.8387 |
| 7/21/2019 | 278.8387 | 146.8387 |
| 7/22/2019 | 278.8387 | 147.8387 |
| 7/23/2019 | 278.8387 | 148.8387 |
| 7/24/2019 | 278.8387 | 149.8387 |
| 7/25/2019 | 278.8387 | 150.8387 |
| 7/26/2019 | 278.8387 | 151.8387 |
| 7/27/2019 | 278.8387 | 152.8387 |
| 7/28/2019 | 278.8387 | 153.8387 |
| 7/29/2019 | 278.8387 | 154.8387 |
| 7/30/2019 | 278.8387 | 155.8387 |
| 7/31/2019 | 278.8387 | 156.8387 |
| 8/1/2019 | 278.8387 | 157.8387 |
| 8/2/2019 | 278.8387 | 158.8387 |
| 8/3/2019 | 278.8387 | 159.8387 |
| 8/4/2019 | 278.8387 | 160.8387 |
| 8/5/2019 | 278.8387 | 161.8387 |
| 8/6/2019 | 278.8387 | 162.8387 |
| 8/7/2019 | 284.8 | 163.8387 |
| 8/8/2019 | 284.8 | 166.9667 |
| 8/9/2019 | 284.8 | 167.9667 |
| 8/10/2019 | 284.8 | 168.9667 |
| 8/11/2019 | 284.8 | 169.9667 |
| 8/12/2019 | 284.8 | 170.9667 |
| 8/13/2019 | 284.8 | 171.9667 |
| 8/14/2019 | 284.8 | 172.9667 |
| 8/15/2019 | 284.8 | 173.9667 |
| 8/16/2019 | 284.8 | 174.9667 |
| 8/17/2019 | 284.8 | 175.9667 |
| 8/18/2019 | 284.8 | 176.9667 |
| 8/19/2019 | 282.871 | 177.9667 |
| 8/20/2019 | 282.871 | 173.2258 |
| 8/21/2019 | 282.871 | 174.2258 |
| 8/22/2019 | 282.871 | 175.2258 |
| 8/23/2019 | 283.1333 | 176.2258 |
| 8/24/2019 | 283.1333 | 173.9333 |
| 8/25/2019 | 283.1333 | 174.9333 |
| 8/26/2019 | 283.1333 | 175.9333 |
| 8/27/2019 | 283.1333 | 176.9333 |
| 8/28/2019 | 283.1333 | 177.9333 |
| 8/29/2019 | 283.1333 | 178.9333 |
| 8/30/2019 | 283.1333 | 179.9333 |
I have a date table containing a value for each day of the year for the past 5 years. There is no active relationship between the record table and the date table.
2 Replies
- amitchandakSuper User
jillw, How do deal with two dates. Refer to my Article
Check for Current employee
You can also check : https://www.dropbox.com/s/yuv64v0cneseghx/value%20Split%20between%20months%20start%20end%20date.pbix?dl=0
- Ashish_MathurSuper User
Hi,
I just do not understand. From Table1, how did you arrive at the numbers in Table2? Something is missing.