Forum Discussion
SeGr
Helper I
4 years agoneed help for creating a custom date horizon
Hi team, I have a request to create a custom date horizon. What does this mean? I am working with forecast snapshots. For instance, if I select this week's snapshot, I will see the forecast for t...
- 4 years ago
Hi SeGr
Thanks for reaching out to us.
you can try this measure
filtermeasure = var _week1=MINX(ALLSELECTED(weeks),[value]) var _week2=MAXX(ALLSELECTED(weeks),[value]) var _date1= MINX(ALLSELECTED('calendar'),[Date]) var _date2= MAXX(ALLSELECTED('calendar'),[Date]) var _date3= _date1+_week1*7 var _date4= _date2+_week2*7 return IF(MIN('Table'[date]) >=_date3 && MIN('Table'[date])<=_date4,1,0)Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
SeGr
Helper I
4 years agoI found a more efficient way of doing this - define an upper and lower bound and calculate the measure to be between those 2. Make the upper bound to be dependent of a parameter to make it dynamic.