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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
uie79957
Regular Visitor

Calculate percentage of entries >x days

Hi there, 

 

I am struggling writing a DAX code for following calculation. I have the table below (simplified) and I want to calculate the share of customer complaints with a processing time >42 days. The column "processing time" is calculated from "date opened" and "date closed"

 

Customer Complaint Claim IDDate OpenedDate ClosedProcessing Time
123.08.202130.11.202199
229.09.202230.09.20221
307.06.202211.07.202234
4...------
5...------
6...------
7...------

 

Thanks for your support

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@uie79957 , if you do not have Processing Time

 

a new column

Processing Time= datediff([OpenDate], [Close Date], Day )+1

 

 

A new measure

 

divide(countrows(filter(table, Table[Processing Time] >42)), countrows(table))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You could create a measure like

Percent overdue =
VAR TotalComplaints =
    COUNTROWS ( 'Table' )
VAR ComplaintsOver42 =
    CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Processing time] > 42 )
RETURN
    DIVIDE ( ComplaintsOver42, TotalComplaints )
amitchandak
Super User
Super User

@uie79957 , if you do not have Processing Time

 

a new column

Processing Time= datediff([OpenDate], [Close Date], Day )+1

 

 

A new measure

 

divide(countrows(filter(table, Table[Processing Time] >42)), countrows(table))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.