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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
prbibuilder
Regular Visitor

Calculating Rolling Days - Blank Date field - not working

Hello BI Group,

 

I am attempting to create a rolling day count of open & closed tickets, based on the fact that the 

the open tickets date column is BLANK and the closed date field is not. 

 

My first measure to count the number of closed tickets is (and is calculating the correct number) :

 

Count Closed Tickets = CALCULATE([Count HelpDesk Rows], FILTER(HelpDesk, HelpDesk[Resolution Date] <> 0))
 
This comes up with the correct number.
 
However, when I attempt to create an additional measure to calculate the number of closed tickets
for the last 90 days (Rolling), the results are scewed.
 
Here is the second measure.
 
ClosedTicketsRolling90 = CALCULATE([Count CLosed Tickets], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -90, DAY))
 
MAX(DateDim[Date]) is always current date.
 
Thanks in advance.
 
 
 
1 ACCEPTED SOLUTION
prbibuilder
Regular Visitor

This solution is actually for calculation a rolling day count of Open and Closed tickets in a help desk system.

 

First, I had to create one measure to count the number of rows in the table helpdesk.

Two, I had to create a measure that counted the number of open tickets by their status' (status column)

( I had to dig in the data to see what ticket categories were for open, and then for closed tickets.

Open =  Resolution Date is NOT populated.

Closed = A populated resolution date.

 

I had to create two DateDIM tables, one for open tickets, and the other for closed tickets.

You need a relationship between the DateDim table and the helpdesk table joined by the creation date.

You need a relationship from the second Date2Dim table and the helpdesk table's resolution date.

 

After creating the above measures, additional table, and the relationships, the below measures worked correctly.

 

HelpDesk Open 7 Days = CALCULATE([HelpDesk-CountOpenTx], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -7, DAY))

HelpDesk Closed 7 Days = CALCULATE([HelpDesk-CountClosedTx], DATESINPERIOD(DateDim2[Date], MAX(DateDim2[Date]), -7, DAY))

 

I hope this helps someone out in the future.

 

PR

View solution in original post

1 REPLY 1
prbibuilder
Regular Visitor

This solution is actually for calculation a rolling day count of Open and Closed tickets in a help desk system.

 

First, I had to create one measure to count the number of rows in the table helpdesk.

Two, I had to create a measure that counted the number of open tickets by their status' (status column)

( I had to dig in the data to see what ticket categories were for open, and then for closed tickets.

Open =  Resolution Date is NOT populated.

Closed = A populated resolution date.

 

I had to create two DateDIM tables, one for open tickets, and the other for closed tickets.

You need a relationship between the DateDim table and the helpdesk table joined by the creation date.

You need a relationship from the second Date2Dim table and the helpdesk table's resolution date.

 

After creating the above measures, additional table, and the relationships, the below measures worked correctly.

 

HelpDesk Open 7 Days = CALCULATE([HelpDesk-CountOpenTx], DATESINPERIOD(DateDim[Date], MAX(DateDim[Date]), -7, DAY))

HelpDesk Closed 7 Days = CALCULATE([HelpDesk-CountClosedTx], DATESINPERIOD(DateDim2[Date], MAX(DateDim2[Date]), -7, DAY))

 

I hope this helps someone out in the future.

 

PR

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.