Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
denwo2010
Creator
Creator

Left join and isnull

Hi, I have the following script LEFT JOIN  LOAD If(IsNull([PO Total])=-1,0,[PO Total]) as [PO Total],     [Order No]&'_'&[Order Line No] as [PO Key]     FROM D:\QlikView\02_QVD\po_shipping_aggr.qvd (qvd); DROP FIELDS [PO Key]; When I have the results back for the PO Total, the ones where there is no match it will show as '-' ? I want it to appear as 0 as I would expected from the abive If Isnull logic? Any ideas how to get round this? Thanks

11 Replies
Not applicable

Try this way:

If(IsNull([PO Total]), 0, [PO Total]) as [PO Total]

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can use the NullasValue variable to show the null into some value.

     So the syntax will be.

     NullAsValue A,B;

     Set NullValue = '0';

     Load A,B from x.csv;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
denwo2010
Creator
Creator
Author

Hi, I have tried that also but still shows the missing values as '-' Thanks

denwo2010
Creator
Creator
Author

Hi Kaushik Solanki, Not sure what you mean, how would I do this on my current script? Thanks

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Just put this at the start of your script.

      NullAsValue [PO Total]

     Set NullValue = '0';

     Reload the app and see the change.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Maybe the problem isn't that you have a null, but you have an incorrect value on the table. Check the values of the field once you have loaded it, withouth making any transformation on it...

QV uses the '-' when cannot calculate something...

denwo2010
Creator
Creator
Author

Hi Kaushik Solanki, I have tried this by putting at the start of script, but it does not seem to have done anything? Is it meant to be two different names NullAsValue & NullValue? Thanks

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You should use NullAsValue.

     If you want you can go to Help and get the details.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
denwo2010
Creator
Creator
Author

So I've put the below script before the start of the Load NullAsValue [PO Total Changes]; Set NullValue = '0'; Do I need to change my existing If Isnull formula? Should I be creating a variable on the "Variable Overview" ? Thanks