Forum Discussion
Average Days Open
I am trying to create a chart similar to the one below that displays the average amount of days that records are open on any given date.
This image is from a table containing different reports and it outputs the correct information. The DAX for the measure used above is as follows:
| SCAR Record ID# | SCAR Date Open | SCAR Closed Date |
| 474 | 3/29/2019 | |
| 473 | 3/28/2019 | |
| 472 | 3/19/2019 | |
| 471 | 3/14/2019 | |
| 464 | 12/17/2018 | 4/2/2019 |
| 463 | 11/20/2018 | |
| 461 | 11/12/2018 | |
| 459 | 11/7/2018 | 3/7/2019 |
| 457 | 10/12/2018 | 3/7/2019 |
| 456 | 10/9/2018 | 3/5/2019 |
| 455 | 10/5/2018 | 4/2/2019 |
| 451 | 9/10/2018 | |
| 448 | 7/30/2018 | 11/28/2018 |
| 446 | 7/26/2018 | 9/12/2018 |
| 445 | 7/26/2018 | 9/12/2018 |
The Measure I am using for this table is as follows:
The numbers I am getting are almost twice as big as they should be. I have tried rewriting this code several different ways but I am still coming to the same results. I think I might be missing something else that is causing the data to be skewed.
3 Replies
- parry2kSuper User
- madbairdFrequent Visitor
I am having same issue with almost exact same table. Need average open per month by fiscal year. Average needs to be by close date and not open date. Meaning if ticket was opened in November and closed in January, the time open should be reported for January. This is my table exported to Excel and DaysOpen is done in Excel not from BI:
TicketNbr CreatedOn ClosedOn DateDiff
TCK-347663 5/3/2021 6/7/2021 35
TCK-351210 6/1/2021 6/7/2021 6
TCK-350980 5/28/2021 6/7/2021 10
TCK-351322 6/1/2021 6/7/2021 6
TCK-351631 6/3/2021 6/7/2021 4
TCK-350881 5/27/2021 6/7/2021 11
TCK-351254 6/1/2021 6/7/2021 6
TCK-351417 6/2/2021 6/7/2021 5
TCK-351633 6/3/2021 6/7/2021 4
TCK-349579 5/18/2021 6/7/2021 20
TCK-351052 5/28/2021 6/7/2021 10
TCK-347662 5/3/2021 6/7/2021 35
TCK-351416 6/2/2021 6/7/2021 5
TCK-351451 6/2/2021 6/7/2021 5
TCK-351154 5/31/2021 6/7/2021 7
TCK-350822 5/27/2021 6/7/2021 11
TCK-351114 5/29/2021 6/7/2021 9
TCK-330545 12/2/2020 187
TCK-338001 2/8/2021 119
TCK-338245 2/9/2021 118
TCK-339071 2/17/2021 110
TCK-339764 2/23/2021 104
TCK-340275 2/26/2021 101
TCK-341736 3/11/2021 88
TCK-342112 3/15/2021 84
TCK-343390 3/25/2021 74