Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

how to sum a value based on two dates

Hi everone, I'm struggling with a measure that requires a sum of a value only if the Date1 is minor than Date2 or Data2 = null.

 

I tried first, 

 

Measure = 

VAR D1 = LASTDATE('Table'[Date1])

RETURN

 

CALCULATE(SUM('Table'[Value]),Table[Date2] >  D1 || Table[Date2] = BLANK())

 

not sure if the filter of calculate will respect the followed condition

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    I don't see an immediate issue with the formula, but sample data and expected output would help me confirm.