cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Progress to date table

Hello,

 

I am struggling to produce what I would refer to as a progress to date table.

Basically at each month the table should display a count of the latest status's.

 

So in the example below ID A2 has been closed in March-17 but should still contribute to the April and May count of closed until it is changed to Issued. Only then does it stop counting towards Closed but contributes to the Issued Status instead.

 

ID A1 is an example of a changing ID through the months.

 

Data Input:

 

IDStatusChangedDate
A1Opened01-Mar-17
A2Closed07-Mar-17
B4Closed09-Mar-17
C3Opened09-Mar-17
A1Closed01-Apr-17
A1Issued01-May-17

 

Ideal Output:

DateOpenClosedIssued
Mar-17220
Apr-17130
May-17121

 

Summary
Row 1) Open = A1, C3; Closed = A2, B4
Row 2) Open = C3; Closed = A2, B4, A1
Row 3) Open = C3; Closed = A2, B4; Issued = A1

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Progress to date table

@chris_k,

Firstly, each ID that is closed should have open date in your Table, right? If so, create the following columns in your table.

OpenDate = CALCULATE(MIN(Table1[ChangedDate]),FILTER(Table1,Table1[ID]=EARLIER(Table1[ID])))
CloseDate = IF(Table1[Status]="Closed",Table1[ChangedDate],BLANK())
IssueDate = IF(Table1[Status]="Issued",Table1[ChangedDate],BLANK())

NewCloseDate = 
VAR vid = Table1[ID]
RETURN
    CALCULATE (
        FIRSTNONBLANK ( Table1[CloseDate], 1 ),
        FILTER (
            ALL ( Table1 ),
            Table1[ID] = vid          
               && NOT(ISBLANK( Table1[CloseDate] )
        )
    ))
NewIssueDate = 
VAR vid = Table1[ID]
RETURN
    CALCULATE (
        FIRSTNONBLANK ( Table1[IssueDate], 1 ),
        FILTER (
            ALL ( Table1 ),
            Table1[ID] = vid  
                && NOT(ISBLANK( Table1[IssueDate])
        )
    ))

Secondly, create a new table using DAX below.

Test = SUMMARIZE(Table1,Table1[ID],Table1[OpenDate],Table1[NewCloseDate],Table1[NewIssueDate])

Thirdly, calculate opened/closed/issued tickets following the instructions in this similar thread.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: Progress to date table

@chris_k,

Firstly, each ID that is closed should have open date in your Table, right? If so, create the following columns in your table.

OpenDate = CALCULATE(MIN(Table1[ChangedDate]),FILTER(Table1,Table1[ID]=EARLIER(Table1[ID])))
CloseDate = IF(Table1[Status]="Closed",Table1[ChangedDate],BLANK())
IssueDate = IF(Table1[Status]="Issued",Table1[ChangedDate],BLANK())

NewCloseDate = 
VAR vid = Table1[ID]
RETURN
    CALCULATE (
        FIRSTNONBLANK ( Table1[CloseDate], 1 ),
        FILTER (
            ALL ( Table1 ),
            Table1[ID] = vid          
               && NOT(ISBLANK( Table1[CloseDate] )
        )
    ))
NewIssueDate = 
VAR vid = Table1[ID]
RETURN
    CALCULATE (
        FIRSTNONBLANK ( Table1[IssueDate], 1 ),
        FILTER (
            ALL ( Table1 ),
            Table1[ID] = vid  
                && NOT(ISBLANK( Table1[IssueDate])
        )
    ))

Secondly, create a new table using DAX below.

Test = SUMMARIZE(Table1,Table1[ID],Table1[OpenDate],Table1[NewCloseDate],Table1[NewIssueDate])

Thirdly, calculate opened/closed/issued tickets following the instructions in this similar thread.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors