Discussion board where members can get started with Qlik Sense.
Im new employee in QLIK in my company.
I hav problems about Two script lines from my example sql procedure:
,ISNULL(B.[Dimension Value Code],ISNULL(F.REGIONKL,'')) REG_DIM
I try to write code at Qlik as :
IF(IsNull("Dimension Value Code"),IF(ISNULL(REGIONKL),'',REGIONKL),"Dimension Value Code") as REG_DIM,
IF(IsNull(DOSTAWA_KRAJ) or DOSTAWA_KRAJ='',IF(ISNULL(Country),'',Country),DOSTAWA_KRAJ) as DOSTAWA_KRAJ,
But My records don't have at all that same values like i will exec full script from SQL.
This is only small section from this code. Whole procedure is much more big, but i didnt saw more operations on this values.
Why i hav problems. That same "company name" from one table hav additional region and country in record, but for other record isn't.
Go to Solution.
Please use the below script in QlikSense to check the null value with len function.
if(len([Dimension Value Code])=0,if(len(REGIONKL)=0,'',[REGIONKL]),[Dimension Value Code]) as REG_DIM
if(len([DOSTAWA_KRAJ])=0,if(len(Country)=0,'',[Country]),[DOSTAWA_KRAJ]) as DOSTAWA_KRAJ
why not just use SQL as is in your script...
Becouse i wanna know how to write this as Qlik code, not SQL
There doesn't seem to be anything wrong with the "translation", so it may have something to do with the rest of the SQL.
Complete code is always preferable and sample data.
Sometimes the issue is not where we think.
Personally, i use SQL or Qlik code based on what is easier to write/understand and prefer as much be done by the database as possible...