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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nabilhas
Regular Visitor

count rows with date that's within last two weeks

I have a table that contains warehouse locations and a "last verified date".  I would like to count locations that were verified during the last two weeks from today.  

binaudit.PNG

 

 

 

 

Thanks for your help,

NH

1 REPLY 1
malagari
Responsive Resident
Responsive Resident

You can do something like this:

 

CALCULATE( 
COUNTROWS( Table ), FILTER(Table, DATEDIFF(Table[Last Verif Date], TODAY(), DAY) <= 14) )

 

The FILTER argument filters down to rows whose [Last Verif Date] is within 14 days of today.  You may want to change it to less than instead of less than or equal to, depending on your logic. 

Dan Malagari
Consultant at Headspring

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.