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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
hpayne93
Frequent Visitor

DAX measure to filter a date range

Hi,

 

I'm struggling to filter my measure within a time range.

 

I need to CALCULATE(COUNTROWS) of my 'Contact' whereby their 'contact[Diagnosis Date] is within the last year.

 

Any tips would be great!!

5 REPLIES 5
hpayne93
Frequent Visitor

Ah actually I need to update it slightly! I need to capture the 'contact'[diagnoses date] in relation to 'book application'[sentdate]

 

I need to be able to quantify where the 'book application'[sent date] is within a year of the diagnoses date. Is that at all possible?

You should just be able to change the last date in the measure to 'book application'[sent date] 

 

If I answered your question, please mark my post as solution

 

Appreciate your Kudos 👍

hpayne93
Frequent Visitor

Worked perfectly thankyou!

No problem, happy to help 🙂

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,
 
try something like this:
 
Last Year Days = CALCULATE (
        COUNTROWS( 'Table'),
        DATESINPERIOD ( 'Table'[update date], LASTDATE ( 'Table'[update date] ), -1, YEAR )
    )
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.