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
ayoubb
Helper IV
Helper IV

counting how many tickets resolved on the same day of creation and resolution

Hello, 

 

i will be greatfull  to help me to complete this requtes.

 

let's suppose i have this table below, and i want to create a DAX to calculate how many tickets were resolved on 12/12/2020 taking an account only the tickets which have been created at the same date which is 12/12/2020 

 

filter.JPG

 

DATA BASE.JPG

 

thank you for your help.

 

Best regards, 

 

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @ayoubb ,

 

We can create a date table (no relationship) and a measure to meet your requirement.

 

1. Create a date table.

 

Date = CALENDAR("2020/11/1","2020/12/31")

 

coun1.jpg

 

2. Then we can create a measure get the result below.

 

Account = 
var _select = SELECTEDVALUE('Date'[Date])
return
CALCULATE(DISTINCTCOUNT('Table'[Tickets]),FILTER('Table','Table'[DateofCreation]=_select && 'Table'[Resolution]=_select))

 

coun2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @ayoubb ,

 

How about the result after you follow the suggestions mentioned in my original post?

Could you please provide more details or expected result about it If it doesn't meet your requirement?

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.

 

Best regards,

 

Community Support Team _ zhenbw

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

v-zhenbw-msft
Community Support
Community Support

Hi @ayoubb ,

 

We can create a date table (no relationship) and a measure to meet your requirement.

 

1. Create a date table.

 

Date = CALENDAR("2020/11/1","2020/12/31")

 

coun1.jpg

 

2. Then we can create a measure get the result below.

 

Account = 
var _select = SELECTEDVALUE('Date'[Date])
return
CALCULATE(DISTINCTCOUNT('Table'[Tickets]),FILTER('Table','Table'[DateofCreation]=_select && 'Table'[Resolution]=_select))

 

coun2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

AlB
Super User
Super User

Hi @ayoubb 

1. Place Creation date and Resolution date on a slicer each and select the date

2. Place this measure in a card visual

Measure =
DISTINCTCOUNT( Table1[Tickets] )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

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.