Forum Discussion
JC2022
1 year agoHelper III
Week over week measure
Hi, I have created this "# Open tickets EOP" measure and it is working and looks like this below: OpenTasksWoW = VAR MinDate = MIN ( 'dim_date'[Date] ) VAR MaxDate = MAX ( 'dim_date'[Date] ) VA...
- 1 year ago
JC2022
Aplogies again for the late response.
I hope the following fulfils your requirement.DaysOpen = VAR MinDate = MIN ( 'dim_date'[Date] ) VAR MaxDate = MAX ( 'dim_date'[Date] ) RETURN AVERAGEX ( CALCULATETABLE ( VALUES ( CurrentRow_tasks[taskKey] ), CurrentRow_tasks[taskCreatedDateDK] <= MaxDate, OR ( CurrentRow_tasks[BusinessClosingDateDK] > MinDate, ISBLANK ( CurrentRow_tasks[BusinessClosingDateDK] ) ), REMOVEFILTERS ( 'dim_date' ) ), CALCULATE ( VAR CreatedDate = MAX ( CurrentRow_tasks[taskCreatedDateDK] ) VAR ClosedDate = COALESCE ( MAX ( CurrentRow_tasks[BusinessClosingDateDK] ), MaxDate ) RETURN DATEDIFF ( CreatedDate, MIN ( ClosedDate, MaxDate ), DAY ), CurrentRow_tasks[taskCreatedDateDK] <= MaxDate, OR ( CurrentRow_tasks[BusinessClosingDateDK] > MinDate, ISBLANK ( CurrentRow_tasks[BusinessClosingDateDK] ) ), REMOVEFILTERS ( 'dim_date' ) ) )
d_m_LNK
1 year agoSuper User
On your variables for CreatedDate and ClosedDate, Change those to SelectedValue() instead of the MAX function as I am guessing you want to get the created an closed dates for those specific tickets and not the MAX created date in that column.
JC2022
1 year agoHelper III
No, this is not solving the problem. Thank you for trying to help. Is anyone else having the solution?