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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Ol92
Regular Visitor

Using dates from 2 tables to identify late transactions

Hi,

New to Power BI and struggling with comparing event dates against a deadline.  I need to take data similar to below and identify which requests were processed late and by how many days.  On time = requests filed 6th-20th of month processed by 20th, filed 21st to 5th of month, due by 5th. 

 

I have defined the due dates in my Calendar table but anytime I try to build a Measure or Calculated Column for this, it won't allow me to include the Due Date field or the Process Date field.  I know the fields need to be aggregated before I can include them there and I tried the solution below using Max but it only aggregates one of the fields so I couldn't complete the formula.

 

check = IF(CALCULATE(MAX(Table4[Release Date]),FILTER(Table4,Table4[Release Date]<=EARLIER(Table4[Delivery Date])))=Table4[Release Date],1,0)

 

I have also tried using Relate but run into the same problem, at some point I can't retrieve a needed field of data from my fact table.  Clearly there is some basic understanding I'm missing but I've been researching for some time now and I'm not finding a solution.  Any help would be greatly appreciated. 

 

Req IDReq TypeReq DateProcess Date
75Type 12/15/20222/25/2022
76Type22/14/20222/19/2022
77Type 13/21/20223/26/2022
78Type 13/30/20224/7/2022
79Type 24/9/20224/17/2022

 

1 ACCEPTED SOLUTION

I have found a workable solution, though probably not aligned with STAR schema best practice.  I was focused on using calculated columns and measures to bring the two date values together but after stepping away for a while I realized I could just merge the tables to have both dates in the same place. 

 

From there I made two calculated columns

1) Find the interval between the two dates (Processed Date minus Request Date) and 

2) Use the resulting value to identify the status (<0 = Late)

 

Now I just need to filter for Late and I can do any rollup I need.  If there's a better way to do this outside of the queries, I would love to hear it but for now at least my report is back on track.

View solution in original post

3 REPLIES 3
Ol92
Regular Visitor

Hi Parry, thanks for the response.  Here is a sample of the summary I'm having trouble with.  

 

Data   
Req IDReq TypeReq DateProcess Date
75Type 12/15/20222/25/2022
76Type22/14/20222/19/2022
77Type 13/21/20223/26/2022
78Type 13/30/20224/7/2022
79Type 24/9/20224/17/2022
    
Summarized   
Period EndingTotal RequestsProcessed Late 
2/20/202222 
3/5/202200 
3/20/202200 
4/5/202222 
4/20/202210 
parry2k
Super User
Super User

@Ol92 from the table you gave, what is the expected output?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I have found a workable solution, though probably not aligned with STAR schema best practice.  I was focused on using calculated columns and measures to bring the two date values together but after stepping away for a while I realized I could just merge the tables to have both dates in the same place. 

 

From there I made two calculated columns

1) Find the interval between the two dates (Processed Date minus Request Date) and 

2) Use the resulting value to identify the status (<0 = Late)

 

Now I just need to filter for Late and I can do any rollup I need.  If there's a better way to do this outside of the queries, I would love to hear it but for now at least my report is back on track.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors