cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nti-cristiano Frequent Visitor
Frequent Visitor

Filter the tickets which have the same opened/closed date

Hi guys!!

 

Today I can filter (closed tickets or opened tickets) in my tickets system by the date using two separated measures. I'm not able to get tickets which have the same date/period of "Opened_Date" and "Closed_Date" according the dCalendar table

 

DETAILS of my filters and tables that I use today:

 

dCalendar = table used to filter by date, month, year etc.

 

Tickets Opened = COUNTROWS(dTicket)

 

Tickets Closed = CALCULATE(COUNTROWS(dTicket);USERELATIONSHIP(dTicket[Closed_Date];dCalendar[Date]))

 

PS.: I use USERELATIONSHIP because the table "dTicket" have the two columns ("Opened_Date" and "Closed_Date") connected to dCalendar[Date] so I have active/inactive relationship.

 

How can I get/filter the tickets which have the same date in the "opened_date" and "closed_date" simultaneously as I change the date in the visual?

1 ACCEPTED SOLUTION

Accepted Solutions
nti-cristiano Frequent Visitor
Frequent Visitor

Re: Filter the tickets which have the same opened/closed date

Hi everyone!!

 

Finnaly, I got this problem resolved on my own!! If someone is facing this problem, I share the solution that I figured out:

 

Total Closed on Same Date =
CALCULATE(COUNTROWS(dTicket); FILTER(dTicket; AND(dTicket[Created_Date]<=MAX(dCalendar[Date]);dTicket[Created_Date]>=MIN(dCalendar[Date])));FILTER(dTicket; AND(dTicket[Closed_Date]<=MAX(dTicket[Created_Date]);dTicket[Closed_Date]>=MIN(dTicket[Created_Date]))))

 

 

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Filter the tickets which have the same opened/closed date

@nti-cristiano if I understood it correctly you can do something like this

 

Add following column

Same Day Close Flag = IF( Table[OpenDate] = Table[CloseDate], 1, 0 )

Add measure to get count of same day close

 

Total Closed on Same Day = SUM( Table[Same Day Close Flag] )





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





nti-cristiano Frequent Visitor
Frequent Visitor

Re: Filter the tickets which have the same opened/closed date

Hi @parry2k ,

 

Thanks for the help! I just tested creating the column and the measure as you said but didn't work. I realized why, actually it just returns TRUE if the the dates (opened and closed) are exacly the same, like 07/02/2019 = 07/02/2019 equal TRUE,  but what I need is to compare the dates using the table dCalendar clicking on the dates in the visual, the dCalendar can be used by month, day, year etc to filter the table dTicket. Example using dCalendar by month I need to know how many tickets were opened in the month and how many were closed in this same month.

nti-cristiano Frequent Visitor
Frequent Visitor

Re: Filter the tickets which have the same opened/closed date

I think this problem there is no solution I tried everything if someone can help me I'll apreciate! 

nti-cristiano Frequent Visitor
Frequent Visitor

Re: Filter the tickets which have the same opened/closed date

Hi everyone!!

 

Finnaly, I got this problem resolved on my own!! If someone is facing this problem, I share the solution that I figured out:

 

Total Closed on Same Date =
CALCULATE(COUNTROWS(dTicket); FILTER(dTicket; AND(dTicket[Created_Date]<=MAX(dCalendar[Date]);dTicket[Created_Date]>=MIN(dCalendar[Date])));FILTER(dTicket; AND(dTicket[Closed_Date]<=MAX(dTicket[Created_Date]);dTicket[Closed_Date]>=MIN(dTicket[Created_Date]))))

 

 

View solution in original post

sreeni Frequent Visitor
Frequent Visitor

Re: Filter the tickets which have the same opened/closed date

Hi Cristanio, I'm facing the same problem as you have encountered. But I have applied the solution which you have given but data is not matching. If possible can you please share PBIX file or you can explain in detail.

Thank you.

SRRY.


@nti-cristiano wrote:

Hi everyone!!

 

Finnaly, I got this problem resolved on my own!! If someone is facing this problem, I share the solution that I figured out:

 

Total Closed on Same Date =
CALCULATE(COUNTROWS(dTicket); FILTER(dTicket; AND(dTicket[Created_Date]<=MAX(dCalendar[Date]);dTicket[Created_Date]>=MIN(dCalendar[Date])));FILTER(dTicket; AND(dTicket[Closed_Date]<=MAX(dTicket[Created_Date]);dTicket[Closed_Date]>=MIN(dTicket[Created_Date]))))

 

 


 

Helpful resources

Announcements
New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,849)