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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Syndicate_Admin
Administrator
Administrator

Creation of measure according to date

Hello Community, I have a question and I do not know how to make the query, but I will try to be clear ...

I have a table with several columns (management, area, company, description of the action to be performed, status of the share (late, on time, etc.) and the expiration date of the share).

What I need is to generate a measure that allows me to obtain the number of all corrective actions with delayed action status that are more than 15 days late.

How can I do it?

Thank you

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Syndicate_Admin , There should be two days, assume the second date is today. You need a measure

 

Calculate(countrows(Table), filter(Table, Table[Status] = "Late" && Table[expiration date] <Today() -15 ))

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

Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Something like below:

measure = Calculate(COUNT([ACTION]),FILTER('TABLE',[STATUS]="LATE"&&[DELAYED DATE]>15))

If you don't have the [DELAYED DATE] in the table, you could use DATEDIFF() function to get the day difference between [expiration date] and TODAY() or any given date.

Modify the formula as below:

measure = 
VAR DELAYED DATE = DATEDIFF([expiration date],TODAY(),DAY)
RETURN

Calculate(COUNT([ACTION]),FILTER('TABLE',[STATUS]="LATE"&&[DELAYED DATE]>15))

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Something like below:

measure = Calculate(COUNT([ACTION]),FILTER('TABLE',[STATUS]="LATE"&&[DELAYED DATE]>15))

If you don't have the [DELAYED DATE] in the table, you could use DATEDIFF() function to get the day difference between [expiration date] and TODAY() or any given date.

Modify the formula as below:

measure = 
VAR DELAYED DATE = DATEDIFF([expiration date],TODAY(),DAY)
RETURN

Calculate(COUNT([ACTION]),FILTER('TABLE',[STATUS]="LATE"&&[DELAYED DATE]>15))

 

Best Regards,

Jay

amitchandak
Super User
Super User

@Syndicate_Admin , There should be two days, assume the second date is today. You need a measure

 

Calculate(countrows(Table), filter(Table, Table[Status] = "Late" && Table[expiration date] <Today() -15 ))

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors