Forum Discussion
CEB
8 years agoFrequent Visitor
If formula based on date range
I have a column with a value that I need to override to zero if the date falls outside a 45 day range starting from today. Right now it only works with today’s date. Is there some way I can get it to...
- 8 years ago
I am assuming it's 45 days forward from today
Measure:Measure=
VAR StartDate = TODAY()
VAR EndDate = StartDate + 45
RETURN
CALCULATE(SUM(Append1[Volume This Period]),DATESBETWEEN(Append1[Date],StartDate,EndDate))Column:
Column= VAR StartDate = TODAY() VAR EndDate = StartDate + 45 RETURN IF(AND('Append1'[Date]>=StartDate,Append1[Date]<=EndDate),Append1[Volume This Period],0)
Stachu
8 years agoCommunity Champion
I am assuming it's 45 days forward from today
Measure:
Measure=
VAR StartDate = TODAY()
VAR EndDate = StartDate + 45
RETURN
CALCULATE(SUM(Append1[Volume This Period]),DATESBETWEEN(Append1[Date],StartDate,EndDate))
Column:
Column=
VAR StartDate = TODAY()
VAR EndDate = StartDate + 45
RETURN
IF(AND('Append1'[Date]>=StartDate,Append1[Date]<=EndDate),Append1[Volume This Period],0)CEB
8 years agoFrequent Visitor
Thanks for your help Stachu! I will give these a try in the morning.