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

how to make null as all existing values

I have a requirement in which Region field if null from table 1 means all Region values from table2.

For example I have table Sales with Region a,b,c,d and i have one more table called access which aslo have Region field and if Region is null then it has to take all Region values from Saes i.e a,b,c,d.

Is their any way to generate this type of table in script. and it's not just Region field i have couple of other fields with same scenario and all this fields are from same table.

Thanks in advance.

Vidya.

5 Replies
brindlogcool
Creator III
Creator III

You can use the Applymap function. But on what logic to define the region for the row.

iktrayanov
Creator III
Creator III

Try something like this

Sales:

Load

Region as Region

....

Access:

Load distinct

Region,

Region as %Region

Load distinct

Region,

Null() as %Region

iktrayanov
Creator III
Creator III

You can find better explanation here

http://community.qlik.com/docs/DOC-3451

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you come up with some sample file and example. 

Try like this

Table:

Load

Region as Region,

'

'

'

FROM Table1;

Access:

Load distinct

Region,

Region as RegionTemp

FROM Table2

WHERE Len(Trim()) > 0;

Concatenate(Access)

Load distinct

Region,

Null() as RegionTemp (Instead of Null() use 'All' AS RegionTemp  it is more meaningful)

FROM Table2;

Use RegionTemp as filter, Hope this helps you.

Regards,

Jagan.

nizamsha
Specialist II
Specialist II

use can use apply function

TableA:

mapping  load field1,field2 resident from ur loaded table;

load field3,field4,field5,field6,

applymap('TableA','field2 ') as field7 from ur qvd

or u can u these generic keys

http://community.qlik.com/docs/DOC-3451