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
Anonymous
Not applicable

Count Weekly Created / Resolved tickets

Dear All,

I am new to PowerBI and I have an issue creating the weekly report of the created/resolved tickets.

The data sample is as below, the requirement is to have the total created tickets vs total resolved tickets weekly and monthly, and it can be filter by certain field (here is the component, but it can be the issue type, or other field values). 

 

Data.PNG

 

The report that I expect would be something like below in weekly basis : Report.PNG

 

 

 

 

 

 

 

 

Report 1.PNG

Could you please advise ? 

Many thanks in advance.

Trang

1 ACCEPTED SOLUTION

hi, @Anonymous 

Sorry for my carelessness about your screenshot.

your report has the same logic with my simple sample report,

for your case, you need to add two date columns for [created] and [resolution.date].

Since they are datetime, and have different time for each day, but [date] column in date table only has 12:00:00 AM for each day, therefore, it leads to the wrong result.

So please adjust it as below:

Step1:

Create two date column for  [created] and [resolution.date]

new resolution.date = DATE(YEAR('Table'[resolution.date]),MONTH('Table'[resolution.date]),DAY('Table'[resolution.date]))
new created = DATE(YEAR('Table'[created]),MONTH('Table'[created]),DAY('Table'[created]))

Step2:

Then use these two new columns to create the relationship

Step3:

Adjust the formula as below:

total Resolved = CALCULATE(COUNTA('Table'[ID]),USERELATIONSHIP('Date'[Date],'Table'[new resolution.date]))

here is new sample pbix file, please try it.

and if you still have problem, please share a simple sample pbix file and your expected output.

You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

Community Support Team _ Lin
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

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

For your case, you could try this way as below:

Step1:

Create a new date table and create two relationships with this fact table by [created] and [resolution.date].

Note: One is active and another is inactive.

9.JPG

Step2:

Create two total measure, use USERELATIONSHIP Function for the inactive relationship.

total Create = CALCULATE(COUNTA('Table'[ID]))
total Resolved = CALCULATE(COUNTA('Table'[ID]),USERELATIONSHIP('Date'[Date],'Table'[resolution.date]))

Result:

here is simple example:

7.JPG

8.JPG

For your case, just drag date dim columns and these two measure into line chart .

 

here is sample pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lin, 

Thanks for your advise. 

The first thing is that I can't have a sum of tickets created / resolved weekly. As I understand well, your report is daily basis. 

Secondly, I couldn't reproduce the same report . I have the same number of resolved/closed tickets, and the date column is empty. Please see below. Did it miss somethings ? image.png

 

Trang

hi, @Anonymous 

Sorry for my carelessness about your screenshot.

your report has the same logic with my simple sample report,

for your case, you need to add two date columns for [created] and [resolution.date].

Since they are datetime, and have different time for each day, but [date] column in date table only has 12:00:00 AM for each day, therefore, it leads to the wrong result.

So please adjust it as below:

Step1:

Create two date column for  [created] and [resolution.date]

new resolution.date = DATE(YEAR('Table'[resolution.date]),MONTH('Table'[resolution.date]),DAY('Table'[resolution.date]))
new created = DATE(YEAR('Table'[created]),MONTH('Table'[created]),DAY('Table'[created]))

Step2:

Then use these two new columns to create the relationship

Step3:

Adjust the formula as below:

total Resolved = CALCULATE(COUNTA('Table'[ID]),USERELATIONSHIP('Date'[Date],'Table'[new resolution.date]))

here is new sample pbix file, please try it.

and if you still have problem, please share a simple sample pbix file and your expected output.

You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lili6-msft 

Thank you for your help.

 

Anonymous
Not applicable

Hi Lin,

I had created 2 measures : 

total Resolved = CALCULATE(COUNTA('Table'[ID]),USERELATIONSHIP('Date'[Date],'Table'[new resolution.date]))
total Created = CALCULATE(COUNTA('Table'[ID]),USERELATIONSHIP('Date'[Date],'Table'[new created]))

So finally I have the monthly created and resolved tickets . But the number of tickets is not exact. 

Question 1 : Today is October, if I select 10 months, it will be as below, how could reorder the months by its year? 

image.png

Question 2 : how could i expand in the weekly basis (YYYY-WW) ? Example below 

image.png

 

Many thanks for your help. 

Trang 

hi, @Anonymous 

1. I think you'd better add a Year field in the visual, that will be more clearly for you.

2.Just drag Year and WeekNum field into Axis of line chart and then expand it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.