Hello Experts
Can you please tell me if where am I going wrong or a better way to get results. I tried decode however it went to the level 3 all the time even though there are instances in level 1
IFTHENELSE(QryFinalLookup.MEM_LEVEL0_SHORT iS NULL, IFTHENELSE(QryFinalLookup.MEM_LEVEL1_SHORT IS NULL, ifthenelse(QryFinalLookup.MEM_LEVEL2_SHORT IS NULL, IFTHENELSE(QryFinalLookup.MEM_LEVEL3_SHORT IS NULL,'NOT MAPPED'),QryFinalLookup.MEM_LEVEL1_SHORT),QryFinalLookup.MEM_LEVEL0_SHORT))
Basically logic is there are 4 columns. If level 0 is null check level 1 if level1 is null then check if level 2 is null, if level2 is null then check if level3 is null , if level 3 is null then 'not mapped' OTHERWISE
if level 0 there is a value then thats value should be displayed in the column .
if level 0 is null level1 has value then level1 value thats value should be displayed in the column.
if level1 is null level2 has value then level2 value thats value should be displayed in the column.
if level2 is null level3 has value then level3 value thats value should be displayed in the column.