Forum Discussion
Future and Past Date Filtering
Hi,
i´m looking for some help visualizing the data for the past 30 days, today and the future 30 days. Which formula do i need for this?
Can i use the DATEDIFF formula? Or can i do it with this formula
Measure = IF(MAX(Sheet5[date])<=TODAY()+30,1,0)
I'm trying to filter the date field to include the following only:
1. Today's date, and
2. -30 days before today's date, and
3. +30 days (into the future) after today's date
So the basis of the dynamic update will be always based on today's date.
(Note: I'm using Direct Query as storage mode.)
It would be great if anyone can help me.
Greetings
Anonymous , Try meaures like
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY()+30 && Sheet5[date]>=TODAY()-30))
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY()+30 && Sheet5[date]>=TODAY()))
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY() && Sheet5[date]>=TODAY()-30))
1 Reply
- amitchandak
Super User
Anonymous , Try meaures like
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY()+30 && Sheet5[date]>=TODAY()-30))
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY()+30 && Sheet5[date]>=TODAY()))
Measure = calculate(sum(Sheet5[value]) filter(Sheet5,Sheet5[date]<=TODAY() && Sheet5[date]>=TODAY()-30))