Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

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
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors