Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

How to change the text of non associated value in the table

Hi All,

 

I am planning to change the value from '-' to 'N/A' for non associated value in the table. I tried using the expression as If(Isnull(A),'N/A'), but it is still giving me '-' as it is not associated. Can anyone please help me with this?

Thanks in advance!

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

Try len(A)>0

if not other option is to make all nulls as n/a

in your script use

NULLASVALUE *;

Set NullValue = 'N/A';

then use if condition.

 

varunreddy
Creator III
Creator III
Author

Hi Dilpranjith,

I tried len(sum(A)/Sum(B))>0, still I am getting same result '-'. I don't think NullasValue might work, as this is not a null value based on the field value. It is based on the expression. In QlikView, we have an option to change the missing value. Is there something in QlikSense?

jerryyang756
Creator
Creator

Try This

aggr(if(isnull(A),'N/A',A),A)

varunreddy
Creator III
Creator III
Author

Hi Pritam,

 

"A" here is sum(Pass)/sum(Evaluated). Isnull not working for the non associated value for the dimension.

sudha3295
Contributor II
Contributor II

In the UI, write your the condition using fields from both table. You will be able to replace a text for no association values without making change to script/data model.

Eg:

For below script 

TabA:
load * inline [
A, B
1, A
2, B
];

TabB:
Load * inline [
B,C
B,zzz
];

Here is the UI That replace the no association with text "Unknown" by expression :

=IF(len(C)>0 and len(B)>0,C,'Unknown')   or   use   =IF( isnull(C) and not isnull(B),'Unknown',[C])

sudha3295_1-1650880448142.png