Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Case 0003 How to make missing value at row display as "NO BRAND" ?

Hi All

I have below load script work fine.

[Manufacturer (Brand)] AS BRAND,

it return the table below  , may i know how to make the first row missing value amount 1445 amount , Display as no brand ? instead of now display Blank . By modify the above load script ? 

I have try below , it does not work :-

if([Manufacturer (Brand)]=null , 'NO BRAND',[Manufacturer (Brand)] AS BRAND,

paulyeo11_0-1593827406933.png

 

2 Solutions

Accepted Solutions
Saravanan_Desingh

Can you remove this ?

If(IsNull([Manufacturer (Brand)])
Or [Manufacturer (Brand)]=''
Or Len(Trim([Manufacturer (Brand)]))=0
, 'A NO BRAND',[Manufacturer (Brand)]) AS BRAND_,

Your code was -

If(IsNull([Manufacturer (Brand)])
Or [Manufacturer (Brand)]=''
Or Len(Trim([Manufacturer (Brand)]))=0
, 'A NO BRAND'),[Manufacturer (Brand)] AS BRAND_,

View solution in original post

Kushal_Chawda

Seems like the measure you are using and Brand dimension are in different table, hence logic you are applying is not working in the script. It would have worked or should work if chart's dimension and measure are in same table.

Hence, Instead of script you need to write the below logic in calculated dimension of chart.

=if(Len(Trim([Manufacturer (Brand)]))=0
, 'NO BRAND'),[Manufacturer (Brand)])

View solution in original post

6 Replies
Saravanan_Desingh

Try this.

If(IsNull([Manufacturer (Brand)]) Or [Manufacturer (Brand)]='' Or Len(Trim([Manufacturer (Brand)]))=0, 'NO BRAND',[Manufacturer (Brand)] AS BRAND

 

paulyeo11
Master
Master
Author

Hi Sir

Thank you for your reply. When i load your load script :-

If(IsNull([Manufacturer (Brand)]) Or [Manufacturer (Brand)]='' Or Len(Trim([Manufacturer (Brand)]))=0, 'NO BRAND',[Manufacturer (Brand)] AS BRAND

I get error msg :-

Error in expression:
')' expected

I try to modify your script to below :-

If(IsNull([Manufacturer (Brand)])
Or [Manufacturer (Brand)]=''
Or Len(Trim([Manufacturer (Brand)]))=0
, 'A NO BRAND'),[Manufacturer (Brand)] AS BRAND_,

it does not appear any error , but it does not replace those blank value to A No Brand.

Hope you can advise me.

Paul

Saravanan_Desingh

Can you remove this ?

If(IsNull([Manufacturer (Brand)])
Or [Manufacturer (Brand)]=''
Or Len(Trim([Manufacturer (Brand)]))=0
, 'A NO BRAND',[Manufacturer (Brand)]) AS BRAND_,

Your code was -

If(IsNull([Manufacturer (Brand)])
Or [Manufacturer (Brand)]=''
Or Len(Trim([Manufacturer (Brand)]))=0
, 'A NO BRAND'),[Manufacturer (Brand)] AS BRAND_,

Kushal_Chawda

Seems like the measure you are using and Brand dimension are in different table, hence logic you are applying is not working in the script. It would have worked or should work if chart's dimension and measure are in same table.

Hence, Instead of script you need to write the below logic in calculated dimension of chart.

=if(Len(Trim([Manufacturer (Brand)]))=0
, 'NO BRAND'),[Manufacturer (Brand)])

paulyeo11
Master
Master
Author

Hi Sir

Thank you very much your load script work fine now. Now i like to add below vaule label - No Manufacturer - as A NO Brand. I have try i cannot get it correct. Pls advise me.

- No Manufacturer -

paulyeo11_0-1594000864599.png

 

paulyeo11
Master
Master
Author

Hi Kush

Thank you very much for your sharing. 

Paul Yeo