Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to create a flag field (0/1) base on a condition like: if (condition,1,0) as flag
I want the flag to be true (flag = 1) for 14 days disregarding any condition.
in other words once flag=1 for 14 days than becomes flag = 0 again.
any ideas ?
thank you
Ilan
You mean something like:
if(Date >= today() -14, 1, 0) as flag
maybe within your fact-table unless you creates a master-calendar new with each reload - then it would be better within the calendar-dimension-table.
- Marcus
hi,
Maybe:
if(Interval(Today() - Date,'dd') <= 14,1,0) as Flag
Regards
Neetha
Hi Marcus,
thanks for your quick replay.
the default condition for the flag is not based on date or days its something like:
if (amount >=150,1,0) as flag
but the flag needs to be there only for 14 days disregarding any condition, than 0 again.
Hi All,
thanks for you're quick replay.
the default condition for the flag is not based on date or days, its something like:
if (amount >=150,1,0) as flag
but the flag needs to be there only for 14 days disregarding any condition, than 0 again.
Hi,
You can use either one.
-(Date>=Today()-13 and Date<=Today()) as flag
Regards
Marco
hi,
Maybe try:
if( amount >=150 and Date >= today() -14, 1, 0) as flag
Regards
Neetha
-(Date>=Today()-13 and Date<=Today() and amount>=150) as flag
regards
Marco