Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I want to replace Brandname as OtherBrand where Brandname is null .
I want to do this in the script.
for exemple:
Brandname ,Sales
abc,1000
pqr,2000
-,2500
xyz,1500
when the scrpt will load my Brandname dimension should be like below.
Brandname
abc,
pqr,
OtherBrand,
xyz
Thanks in advance....
if(isnull(Brandname),'OtherBrand',Brandname) as Brandname,
or
if(len(Brandname)>0,Brandname,'OtherBrand') as Brandname,
if(isnull(Brandname),'OtherBrand',Brandname) as Brandname,
or
if(len(Brandname)>0,Brandname,'OtherBrand') as Brandname,
Hi
I tried this but it is not working for me.
is it really null() or is there anything in the field ?
if(IsNull( Brand ),'OtherBrand',Brand)
this syntax is working fine for me
you have there a null value or an empty string or '-' ?
It is depending on it....
Please try this.
ABC:
LOAD *,
if(Brandname ='-','OtherBrand',Brandname)as Brandname1;
LOAD * Inline
[
Brandname ,Sales
abc,1000
pqr,2000
-,2500
xyz,1500
];
Thanks
try qlikview7799 suggestion it will work for sure
where do you get null for BrandName?
in a table? Brandname and Sales are fields of the same table?
in a chart?
in straight table the null value is replaced by OtherBrand in following way by taking
calculated dimesion :if(len(trim(BrandName))=0,'OtherBrand',BrandName)
expression:sum(Sales)
But when i am doing in script blank space is showing.