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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.