Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey All,
I am trying to create an expression that will only show values that are within a certain range of dates. I am having trouble making it a relative function that only shows values that range from two months from today, say 5/9/2022, and all dates before then.
Below is the equation I have been working with. It is not representative of all the attempts I've had, however I believe it best represents the concept that I am trying to achieve.
Thank you for your help. I finally found a solution using parts from both of the answers above. The main problem was that the date format for my field included specific hour and minute time stamps. So I was able to get a new field created and also simplified it to be an open ended range.
@haydenfontana Create a Start Date and End Date variable, and insert the below in your expression;
DateField= {">= $(StartDate) <= $(EndDate)"}
Cheers!
HI
Try like below
ScheduledShipDate = {">$(=Date(Today()-61,'YourDateFormat'))<=$(=Date(Today(),'YourDateFormat'))"}
Both exp results always last 60 days info.
If its dynamic, instead of Today, try with Max(ScheduledShipDate) and ignore all time filters like Year=, Month=
Hey Peter,
Thank you for the advice, however when inputting this into my expression, I end up with no results on my table. I am not sure if I did it right however here is the equation I came up with.
@haydenfontana Try this and ignore all the time dimensions as @MayilVahanan rightly pointed out.
ScheduledShipDate={"$(='>=' & AddMonths(monthstart (max(ScheduledShipDate)),-2)&'<=' & Date(Max(ScheduledShipDate)))"}
Thank you for your help. I finally found a solution using parts from both of the answers above. The main problem was that the date format for my field included specific hour and minute time stamps. So I was able to get a new field created and also simplified it to be an open ended range.