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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PantherusNZ
Helper I
Helper I

Calculate Weekly Total Based on Single Value and then Adjusted by Calculated Counts

I have a list of ticket items opened and closed within the last 6 weeks in two respective tables, as well as a current count of the number of active tickets.

 

The Opened and Closed data is accumulated into a clustered Bar Graph, showing the number of tickets opened and closed per week - what I am wanting to do is to calculate the ticket count total each week across those 6 weeks and have that displayed as a line graph item in that same graph.  The idea is that that weekly total would be calculated by taking the current total, then subtract the number opened and add the number closed last week to get last week's total, then add and subtract the previous week's totals  from that to get the previous total, etc etc.

 

Is such a calculation viable, or is there a better way to get this data displayed?

 

The tickets opened and closed tables look like this:

PantherusNZ_0-1623202435627.png

 while the existing visualisation looks look this:

PantherusNZ_1-1623202470454.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@PantherusNZ , the Issue you are facing not very clear. You can create a common date table and join it open date and close date with respective tables.

For Current ticket you need common ticket table

Current ticket = CALCULATE(COUNTx(FILTER(values(Ticket[Ticket],Min(Open[Start Date])<=max('Date'[Date]) && max(End[End Date])>max('Date'[Date]))),(Ticket[Ticket])))

Thanks for your advice.

 

The ultimate goal is to have a line graph showing the number of open tickets I had over the last 6 weeks, somehow calculated based on the number currently open, and the number of tickets opened and closed over that time period - I have the list of all the tickets, but I could also get the raw numbers of tickets opened closed per week if that makes it easier to calculate.

 

As for your advice on the table - I tried creating that table via DAX and got this error:

PantherusNZ_0-1623212063121.png

 

I assume I'm doing that wrong or in the wrong place?  I'm not familiar with some of those functions...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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