Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to set a default in lookup. I want to default my value of Grossdata = 1 if there is no match.
Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata')
Any help is appreciated.
did you try
if(isnull(Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata')),1,Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata'))
This might not be the most efficient way but it should accomplish what you need?
did you try
if(isnull(Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata')),1,Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata'))
This might not be the most efficient way but it should accomplish what you need?
Tbl:
LOAD * Inline [
Key,Value
1,aaa
2,bbb ];
Load *,If(IsNull(Lookup('Value','Key',Key,'Tbl')),'Default',Lookup('Value','Key',Key,'Tbl')) Inline [
Key
1
2
3 ];
Hi!
Is result numeric? Then what about "RangeSum" or "Alt"?
Alt(
Lookup('dpw','key',NAME &'-' & VENDOR &'-' & Year(DATE) &'-' & Month(DATE) ,'Grossdata')
, 1)