Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Helo Gurus ,
I have never worked on xTD data . Please helping in creating flag in script for all dates which fall in ranger from today to last one year .
for emaple if today is 21 march then date from 21 marcg 2017 to 21march 2018 should have flag as 1 .
thank you all in advance . Please share script , i am not with licence .
May be this?
Let Variable = Max(Date);
Load_Table:
Load Medicine, If(Date>='$(Variable)' and Date<=AddYears('$(Variable)', -1), 1, If(Date>='$(Variable)' and Date<=AddYears('$(Variable)', -2), 2, If(Date>='$(Variable)' and Date<=AddYears('$(Variable)', -3), 3, ...) as Flag, Date, Sale From Table;
Sir can you share screen shot , i am facing problem with date filed . All date are not come proper
Can you try this Front-End and start selection and see whether it is giving anything?
If(Date>=AddYears(Max(TOTAL Date),-1) and Date<=Max(TOTAL Date),1, If(Date>=AddYears(Max(TOTAL Date),-2) and Date<=Max(TOTAL Date),2,3))