If-Statement in a table dimension cannot filter over magnifying glass
I have two date times. One is Inbound and the other one outbound. So the logic is, if the inbound time exist and there is also a outbound time, i know the material is not anymore in the inventory:
if(inboundtime>0 and outboundtime>0, 'Given out on" & [Outboundtime]
As you can see, instead of showing me only the time, there is the information 'given out on' included.
Now the next condition is when there is a inboundtime and NO outboundtime (outboundtime is Null), I know for sure the material is still in my inventory. So put altogether I have this:
if([inboundtime]>0 and isNull([outboundtime]),'in inventory', if([inboundtime]>0 and [ountboundtime]>0 , 'given out on ' & [outboundtime]))
So far as a simple dimension it works pretty well. I have many already given out fields which I can chose exactly the date and qlik is filtering accordingly.
But when I chose the field 'in Inventory' which exist in the search only one time, then I get a confused mix of results and not only those which are still in inventory. I think the if-statement cannot use this way maybe. Anyone has a tip for me?
@jyothish8807 , thanks for the quick reply. But that way its not going to work. The problem is the inboundtime and the outboundtime are coming from two different sources. So when you put the load script into one of the source it either will say it cannot find inboundtime or cannot find outboundtime. Depending if I put the script to the source of inboundtime or either outboundtime.