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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
RDS2017
Frequent Visitor

Count of Items overDue >30 Days Measure

hello

I have a column for performed date and another column of Report date. I would like to create a measure that shows either

a. Of those performed, is the report date <30days

b. Of those performed, is the report date > 30 days

 

Both as percentage

1 ACCEPTED SOLUTION

Hi, @RDS2017 

 

You can try the following methods.
Measure:

Days = DATEDIFF(Max('Table'[Performed Date]),Max('Table'[Report Date]),DAY)
Measure% = 
Var _count1=CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Performed Date]<>BLANK()&&[Report Date]<>BLANK()&&[Days]>30))
Var _count2=COUNTROWS(ALL('Table'))
Return
DIVIDE(_count1,_count2)

vzhangti_1-1699000779121.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @RDS2017 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

NamePerformed DateReport Date
xxx12/05/202308/06/2023
xxx20/05/202330/06/2023
xxx20/05/2023 30/06/2023
xxx20/05/2023 30/06/2023
xxx08/05/2023 30/06/2023

The visual should show 4/5 completed were reported on time (<30days)

Hi, @RDS2017 

 

You can try the following methods.
Measure:

Days = DATEDIFF(Max('Table'[Performed Date]),Max('Table'[Report Date]),DAY)
Measure% = 
Var _count1=CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Performed Date]<>BLANK()&&[Report Date]<>BLANK()&&[Days]>30))
Var _count2=COUNTROWS(ALL('Table'))
Return
DIVIDE(_count1,_count2)

vzhangti_1-1699000779121.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

RDS2017
Frequent Visitor

Percentage > 30 Days =
DIVIDE(
COUNTROWS(
FILTER(
YourTableName,
NOT(ISBLANK(YourTableName[Performed Date])) &&
NOT(ISBLANK(YourTableName[Report Date])) &&
DATEDIFF(YourTableName[Performed Date], YourTableName[Report Date], DAY) > 30
)
),
COUNTROWS(YourTableName)
)

The visual shows up BLANK

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

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.