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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
andrew_hardwick
Helper III
Helper III

Cumulative backlog to date

I am trying to create a line graph in Power BI to show the difference between a number of opened tickets vs resolved tickets on a daily basis. I then want to show a line graph of the cumulative data.

 

I am new to Power BI and whilst I can easily achieve this in Excel, I cannot get what I need. The data is shown below from Excel. The Balance is the difference between Opened and Resolved and then each day it either increases or decreased based on this difference.

 

 

DateOpenedResolvedBalance
18/04/2016523517
19/04/2016624732
20/04/20161119152
21/04/201613010379
22/04/201614196124
23/04/201660130
24/04/201681137
25/04/201610880165
26/04/201610188178
27/04/20167371180
28/04/20166955194
29/04/201693100187
30/04/201640191
01/05/201620193
02/05/201631195
03/05/20168597183
04/05/20166898153
05/05/20166075138
06/05/20167380131
07/05/201630134

 

Capture.PNG

The raw data I have is as below, where the Incident Number is a unique reference

 

Capture 2.PNG

1 ACCEPTED SOLUTION

@andrew_hardwick Couple small changes since there are blank dates...  But you should be set now! Let me know.

 

Running Total Balance - L&C Chart2.png

View solution in original post

21 REPLIES 21
slapdragon
Frequent Visitor

I would like some help here as well please. I have followed the steps and managed to get the numbers working and used a line graph.

The issue I am facing is that the numbers tend to continue for the future weeks though there is (obviously) no data for those dates.

 

pbi_backlogs.jpg

 

In the image, the Week24 is from 10/08/2020 till 16/08/2020. I don't have any data past those dates. But the backlogs for the NEXT week, Week25, shows as 12 (I've got no idea where that's coming from). And that same value goes on all the way till the end of the year, which is Week53.

 

Below are the relationships and measures that I have used:

 

pbi_backlogs_2.JPG

 

Opened = COUNTA('Main'[Date (Ticket Created)])
Resolved = CALCULATE(COUNTA('Main'[Date (Ticket Solved)]), USERELATIONSHIP(Week[Dates], 'Main'[Date (Ticket Solved)]))
RT Balance = CALCULATE([Balance], FILTER(ALL(Week), Week[Dates] <= MAX('Main'[Date (Ticket Solved)])))
Backlog = CALCULATE('Main'[RT Balance], Week[Year]="2020-21")
 
Any help with this would be great. Thanks.
lucasvaliente
New Member

good afternoon, okay? I would like to take a doubt that is making me sleepy already! I discovered the power bi and am madly in love with this software that in my opinion will dominate the world! Where is my problem ??? I'm breaking my head like a madman in order to calculate the backlog in the tool! for example I have projects started from January to now and I need to know what was left open without negotiation. Can you help me please?

lucasvaliente
New Member

good afternoon, okay? I would like to take a doubt that is making me sleepy already! I discovered the power bi and am madly in love with this software that in my opinion will dominate the world! Where is my problem ??? I'm breaking my head like a madman in order to calculate the backlog in the tool! for example I have projects started from January to now and I need to know what was left open without negotiation. Can you help me please?

 

lucasvaliente
New Member

good afternoon, okay? I would like to take a doubt that is making me sleepy already! I discovered the power bi and am madly in love with this software that in my opinion will dominate the world! Where is my problem ??? I'm breaking my head like a madman in order to calculate the backlog in the tool! for example I have projects started from January to now and I need to know what was left open without negotiation. Can you help me please?

 

Sean
Community Champion
Community Champion

@andrew_hardwick Can you post what results you expect for the data sample you've provided on the bottom?

 

                         Opened     Resolved     Balance

April 8, 2016       1                    0               1

April 14, 2016     3                    0               4

April 15, 2016     1                    0               5

April 18, 2016     7                    8               4

April 19, 2016     0                    2               2

May 4, 2016       0                    1               1

May 6, 2016        0                   1                0

 

Also do you have a Calendar Table - you will need one!

Sean
Community Champion
Community Champion

@andrew_hardwick You will need a Calendar Table for this one.

 

Relate both Opened and Resolved Dates from your table to Date in the Calendar Table

Then the Measures are pretty straightforward. Let me know if you have any questions!

Running Total Balance - L&C Chart.png

Hi @Sean

 

No, I do not have a Calendar Table, so I suspect this is where I am going wrong. Do you know where I find one, or how to create one?

 

PS, I really am new to this 🙂

 

Thanks,

 

Andy

@andrew_hardwick 

 

Here's a link on how to create a Calendar table

http://www.powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/

 

Then just set up the relationships and create the measures as in my picture above.

 

Hope this helps. Let me know if you have any other questions.

@Sean

 

Thats great. thanks for that, I now have a Calendar. I have built my report using the measures you stated and the Calendar and it is now almost there, I have the balance and RT Balance showing. The ony remaining issue I see is that some of the lines do not yet have a resolved date, they are still being worked on. This therefore gives me a negative RT Balance at the start as their is no date assigned. Instead I would like this open entries to appear on the latest RT Balance day, i.e. today.

 

Any idea how I could achieve this?

 

Capture3.PNG

@andrew_hardwick Couple small changes since there are blank dates...  But you should be set now! Let me know.

 

Running Total Balance - L&C Chart2.png

Hi @Sean & @andrew_hardwick ,

I have a similar requirement to produce a running total backlog at the end of each week and I think the key is to get the values for each day as illustrated in this example. In my model, a table with dates and other Org specific values already exist and the Date (Ticket Created) field in the master table is linked to the Date field in the Dates table. However, I am having an issue with linking both Date (Ticket Created) and Date (Ticket Solved) to the Date field in the Date table as the relationship for Date (Ticket Solved) remains inactive. I get the message 'You can't create a direct active relationship between Table A and Date Table because an active set of indirect relationships already exists between these tables. To make this relationship active, set the Cross filter direction to "single", delete or deactivate any of the indirect relationships first.".

 

Once I get past this, I need some help in segregating the backlog of tickets based on ticket type which can be one of "incident", "problem", "question", "task" and by priority which will be one of "urgent", "high", "normal", "low". All tickets being counted as backlog should be out of SLA for which I am using the SLA metric assigned by the tooling solution and have created a field IsSLABreach = True / False. So for my requirement, IsSLABreach should always be true.

 

Kindly help and oblige.

Anonymous
Not applicable

Hey @Sean , thanks a lot! I found this very helpful. I know the post is kind of old, but it's gold.

 

And I also have a question, I needed the RT Balance, and I also need to find the closed balance from previous periods. For example, this month I resolved three tickets that where created on previous months, I need to show that in the chart along the RT Balance, how would I write a measure for that? I have tried several things, but nothing seems to be working.

 

Any advice or guidance in the right direction would be appreciated. Thanks a lot!

Anonymous
Not applicable

Hello all,

 

The calculation for the backlog worked perfectly. However, I would like to display the sum of "points" assigned to each ticket instead of the count of the opened tickets, closed tickets, and RT balance.

 

Ticket Number     Opened Date     Closed Date     Points

1234                     01-01-2019        02-01-2019       7

1254                     01-02-2019        01-09-2019       3

5432                     01-31-2019        02-01-2019       1

1456                     01-22-2019        02-08-2019       4

 

So I would like to display the sum of points for the opened, sum of points for the closed, and sum of points for the backlog.

 

Thank you in advance!

Hi guys, using the opened date from the tickets table everything looks awesome, but using the dates from the date table I got this behavior about to get the negative values at the beginning of the table. Any suggestion?

@diegoadum I'm not entirely sure what your issue is, can you elaborate and I will see if I can help?

Hi @andrew_hardwick, I have solved the issue. it was related to the data type using on the dates fileds in my model. Since I use a master calendar (follow your suggestion) to link with my "tickets" table, and my tickets table has 2 dates fields (Open Date and Close date) I found a situation related to the "close date" field. Some of the tickets are Cancelled, therefore there is no close date in the table, so I have to create a calculate field using the State of each record to figure out if the ticket was cancelled, if so, I'm using Updated date isntead. But, what this cause is that for some reason, I have to change the data type for all the dates field in order to match them as Date (taking away the time portion). At the end and having the same data type for all the date field involve on this the model is working. Hope the explanation can't cause more confution!!

I am working on Something very similar and following the details of this post. I am reviewing the details and can't seem to get the measures listed to work.

 

My sample data is as follows:

 

I have open tickets and resolved tickets working just fine on my Bar Chart, just can't get the Backlog Line to work. 

The logic is I have to work backwards as follows:

 

I start with the current Active Cases (which is the 241 July-17 Backlog, then I add in the Resolved and subtract out the new. i.e.

 

June 17 Backog = 241 + 19 - 26

 

I have the Dates Tabe and # Created and # Resolved Measures working, could you share detail on how you calulated your Backlog ?

 

 OpenedResolvedBacklog
Apr-173424212
May-173836214
Jun-174020234
Jul-172619241

 

This is the end result based on the sample data.

 

image.png

Hi @medwards807

 

OK I have opened and resolved, which are both measures.

 

Then I have two calculations. The first is a measure called balance.

 

Balance = [Opened]-[Resolved]

 

I then use another measure called RT Balance (Running Total). This is the one that I use on my graph.

 

RT Balance = CALCULATE([Balance],FILTER(ALL('Date'),'Date'[Date]<=max('Date'[Date])&&NOT(ISBLANK('Date'[Date]))))

 

This looks like this-

 

Capture.PNG

 

Hope that helps?

@andrew_hardwick

 

This solution works great, thanks alot for the help, I do have just one additional slight bug that I am trying to figure out as follows: I have 2 months where the Backlog is off by 1, is Oct 16 and Dec 16, it looks to be that what is different on these 2 months are the # Created is blank so the backlog seems to bot have recognized that until it hits the next day with a # created value. All of the other period's are correct.

 

My Measures:

 

# Created = CALCULATE(COUNTROWS(Incidents),USERELATIONSHIP(Incidents[Created Date],Dates[Date]),incidents[Status] <> "Cancelled")

 

# Resolved = CALCULATE(COUNTROWS(Incidents),USERELATIONSHIP(Incidents[Resolved Date],Dates[Date]),incidents[Status] <> "Cancelled")

 

Balance = CALCULATE(incidents[# Created] - incidents[# Resolved])

 

Backlog =
CALCULATE(incidents[Balance],FILTER(ALL('Dates'),and('Dates'[Date]<=max('Dates'[Date]), NOT(ISBLANK('Dates'[Date])))))

 

 image.png

Hi @andrew_hardwick,

 

I was reading through this post and tried oud your solution without success.

I think my situation might be slightly different and hoped you could help on this one to :

 

I prepared a simplified version of my raw data (here below)

So basically, i have a ticket on each line.

Each ticket has a opened date, a target for resolution and an actual resolution date 

 

At a given date (today in below example) a ticket is either resolved, late (backlog) or opened and still within time window allowed for resolution.

A ticket may have been late (backlog) at a certain time

 

What i'm trying to achieve:

I would like to set up a cumulative backlog that will show overtime the cumulated backlog and be able to split the line between site A and site B

 

Thanks for your help and your time !

 

Sourceticket IDDate openedTarget closure dateclosed dateis backlogis or has been backlog
Site A101/01/201616/01/201715/01/2017  
Site B201/01/201616/01/2017 18/02/2017yesyes
Site B301/01/201716/01/201718/01/2017 yes
Site A401/02/201716/02/201715/02/2017  
Site A501/02/201716/02/201717/02/2017 yes
Site B601/05/201716/05/2017 16/06/2017yesyes
Site B701/05/201716/05/201715/05/2017  
Site A801/07/201716/07/2017 yesyes
Site A901/07/201716/07/2017 yesyes
Site B1001/07/201716/07/2017 yesyes
Site A915/07/201730/07/2017   
Site B1015/07/201730/07/2017   

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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