Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Submitted and completed in one matrix

Hi,

 

I have a table of tickets with submited, completed, closed, etc. dates and other various info. I do understand how to separate them in two different visuals (like below):

 

So this will show submitted tickets by month (on the left) and completed tickets by month (on the right). Submitted has SubmitDate axis; completed has LastCompleteDate axis. So, different timestamps. This is made to show completed per month no matter when they were submitted.

 

What I do want to have is a matrix (well, basically something, but one visual) where will be tickets Submitted VS. Completed and ratio, split by month.

 

(just example, this one counts open vs completed)

What I am struggling is:

I took June submitted. It will show 72 Completed (with 54 highlighted in June), AND matrix will show 81 submitted, 78 completed, 3 open. From 78 Completed there are 54 that are completed in June and 25 completed in other months starting July (because of those submitted, which were closed after) + 3 still open.

 

From one point this is correct in flames of visuals, but what I want to achieve is: (example)

Submitted in *Month* = 50 (submitted after June 1st and before June 30th including)

Completed in *Month* = 60 (submitted anytime, but completed after June 1st and before June 30th including)

in one matrix. With ratio :)

I assume that there is something to deal with dates. Like I said, for these two visuals I do have 2 different date tables (submitted and lastcompleted). Perhaps I need a calendar, which is somehow linked to both date tables or something.

 

Hopefully someone will understand, as i spent so much time figuring out why stats are so awfully bad and got myself confused already. :)
Thanks in advance.

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous,

    Could you please share sample data of your original table and  post expected result based on sample data here? As your post, you would need to create a calendar table, you can take a look at the following similar threads about calculating opened and completed tickets.

    https://community.powerbi.com/t5/Desktop/Received-vs-Closed-against-Year-Month/td-p/123515
    https://community.powerbi.com/t5/Desktop/calculate-open-tickets-by-date/m-p/207644#M91517

    Regards,
    Lydia

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey,

       

      thanks for reply.

       

       

      .Done is for the reason that some Completed tickets were not actually in that state, but in similars that are, let say, similar. Thus, I made this .Done to count Cancelled and Closed too as this:

      .Done = IF('Model'[Completed] <> BLANK(), 'Model'[Completed], IF('Model'[Closed] <> BLANK(), 'Model'[Closed], 'Model'[Cancelled]))

      Guided by this https://community.powerbi.com/t5/Desktop/Received-vs-Closed-against-Year-Month/td-p/123515 mine "Closed" will be .Done.

       

      TicketSubmittedClosedCompleted CancelledStatus.Done
      117-08-1817-08-18  Closed17-08-18
      220-08-1822-08-1822-08-18 Closed22-08-18
      320-08-1805-09-1820-08-18 Closed20-08-18
      420-08-1805-09-1820-08-18 Closed20-08-18
      521-08-18 26-11-1826-11-18Cancelled26-11-18
      621-08-1830-09-1814-09-18 Closed14-09-18
      721-09-1807-09-1822-08-18 Closed22-08-18
      821-09-1811-11-1826-10-18 Closed26-10-18
      929-09-18   Open 
      1029-09-18   Open 
      1130-09-18   Open 
      1230-09-18   Open 

       

      I have created master calendar

       

      Expected result:

      MonthSubmitted Count Completed Count
      August6 5
      September6 1
      October0 1
      November0 1

       

      Thank you in advance.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

        guided by this https://community.powerbi.com/t5/Desktop/Received-vs-Closed-against-Year-Month/td-p/123515 link I've tried to make similar matrix.

        This is what I got: (I have different titles for table, don't bare that in mind)

        Axis = .Done (from formula below)

        Value = Ticket
        Also a filter for tickets with exact statuses (which is probably not a point).

         

        But matrix shows bit different values:

        These .Closed and .Received are new formulas based on example in the same link you posted (https://community.powerbi.com/t5/Desktop/Received-vs-Closed-against-Year-Month/td-p/123515)

        .Closed = CALCULATE(COUNTA('Model'[Completed]), USERELATIONSHIP('Model'[Completed], MasterCalendar[EveryDate]))

        &

        .Received = COUNTA('Model'[Submitted])   ---- this one works as expected and shows same numbers

         

        For .Closed I've also tried COUNTA('Model'[.Done]), but result is the same as with Completed. Different from first visual.