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
rmiquel
Frequent Visitor

Measure with date variable that needs calculation row by row

Hi,

 

I have been trying to figure this one out but I am going in circles, so asking here in case someone can provide some guidance.

 

I have 2 tables, one with support cases and another with dates. The current relations between the 2 tables are:

 

[Cases]OpenDate -> [Date]Date     This on is active

[Cases]CloseDate -> [Date]Date      This one is inactive

[Cases]SLATarget -> [Date]Date      This one is inactive

 

Where [Cases]OpenDate is when the support case was open, [Cases]CloseDate is when the case was closed, and [Cases]SLATarget is when the SLA for that case expired. Based on this, there is a field called [Cases]Healthy that determines if the case is healthy or not (i.e, if still open and SLA date is in the future, it is healthy, and if it is closed it will compare closed date and SLA Target and determine if it is healthy or not). This piece works ok.

 

Now for the one I am not able to figure out. What I am after is a visual with a timeline that tells me at any point in time in the past, how many cases were healthy at that given date/week/month...I cannot use the field [Cases]Healthy as this is view of that status from todays point of view, and what I need is to recreate the snapshot of healthy cases at that point in time.

 

The end goal is to show in a vert. bar visual with time in the x-axis the percentage of open cases that were healthy in each period, so we can track if we are getting better or worse at keeping our backlog (open cases) healthy.

 

I know I can create that as columns in the date table and count the cases that fit certain criteria, but that would mean losing the slicing or having to create as many columns as slicings I want on the data, so I was hoping to have a measure that handles this.

 

Any help on this will be very helpful.

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

you challenge has a name "Events in progress".

 

What you basically need is a date table that is not related to you case table 🙂

 

Here you will find some guidance for this kind of problem:

http://sqljason.com/2012/11/classifying-and-solving-events-in.html

 

If you get stuck, please prepare a pbix file and some sample data (Excel file), upload the files to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

you challenge has a name "Events in progress".

 

What you basically need is a date table that is not related to you case table 🙂

 

Here you will find some guidance for this kind of problem:

http://sqljason.com/2012/11/classifying-and-solving-events-in.html

 

If you get stuck, please prepare a pbix file and some sample data (Excel file), upload the files to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.