‎2020 Apr 30 6:47 AM
I am trying to create a dimension in IDT 4.2 that would show me the current date minus 2
I tried using this RelativeDate(CurrentDate();-2) ,however when i use this dimension in a filter when i run the query in webi it doesn't work.
Someone had sent me a code that pulls the first day of the month which works toDate(left(toString(curDate()),8)+'01')
Can i modify this one to pull current day minus 2? What would that syntax be?
‎2020 Apr 30 7:32 AM
Hi
Try as below
1. Where(Date = Relativedate(currentdate();-2))or
1. Create a variable lv_day = If([yourdate] <= RelativeDate(Currentdate();-2);1;0)
2. Filter your report by [lv_day] = 1
Regards,
Venkat
‎2020 May 03 7:43 AM
‎2020 May 03 7:55 AM
‎2020 Apr 30 7:03 PM
‎2020 May 02 1:43 PM
Dear Ian
Kindly update if your problem is resolved and update with the solution and mark the answer you accepted.
This will help others to get solution if they get similar issue.
Regards,
Venkat
‎2020 May 03 7:43 AM
‎2020 May 03 7:47 AM