Forum Discussion

Matthew77's avatar
Matthew77
Frequent Visitor
5 years ago
Solved

Measure to return value between two dates (start date and end date)

Hi,   I want to create a measure that returns the number of units between 2 dates. I have went through so many different types of codes I may be over complicating this for myself. I have a table wi...
  • Matthew77's avatar
    Matthew77
    5 years ago

    Hi Amitchadak,

     

    It would be like the below. I just wish to have a measure that will show how the number of units has changed over the years:

     

    THIS CODE WORKED:

     

    Units =
    CALCULATE(
    VALUES(Contract[Units]),
    FILTER(
    Contract,
    Contract[EffectiveDate] <= MAX('Date'[Date])
    && Contract[EndDate] >= MIN('Date'[Date])
     
    but to no avail.