Forum Discussion

jpmeijinhos's avatar
jpmeijinhos
New Member
9 years ago
Solved

Different date value counts

Hello! I'm trying to make a report with multiple values based on a creation date and a resolution date on a ticketing system.   For example:   Issue Created Resolved Client 123 21/07/2...
  • v-micsh-msft's avatar
    9 years ago

    Hi jpmeijinhos,

     

    I could think out the following way to calculate the wanted value in only one table, which would need some transformation of the table you shared, please follow the steps below and see if it could help here:

    1. Open Power BI desktop, under the home tab, click Edit Queries to open Query Editor, press Ctrl and select Created and Resolved columns, under Transform tab, click Unpivot column, then under home tab of Query Editor, click Close and Apply.

    2. Rename the Attribute and the value column to Status and Date, verify the Date column type is Date/time;

    3. Create the measure below:

     

    IssueCreated := countx(
                         filter('Table', 'Table'[Attribute]="Created"),
                         'Table'[Issue])
    IssueResolved = countx(
                          filter('Table', 'Table'[Attribute]="Resolved"),
                          'Table'[Issue])
    backlog = 
    CALCULATE (
        [IssueCreated]-[IssueResolved],
        FILTER (
            ALL ( 'Table'[Value]),
            'Table'[Value]<= MAX ( 'Table'[Value])
        )
    )

    Please see the screenshots:

     

     

     

    If you need any further help regarding this method, please post back.

    Regards