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

how to give name for Nulls in Pie chart

Hi all,

with below fields, I need to give name for the Null values in the pie chart

Load * Inline [ID,NAME,DEPT

                       1,AA,10

                         2,BB,20

                         3,CC,30

];

Load * Inline[ DEPT,DNAME

                      10,DDD

                      20,EEE

                     30,FFF

                    40,GGG

                    50,HHH

];

Here my expression is count id  and dimension is DEPT

So due to the null values (40,50)  I have to give the name "yet to assign"

4 Replies
Not applicable
Author

I would do my second table as a mapping load and create a bucket for all that do not map to a DNAME so they will always be selectable/available.

Base_Table:

Load * Inline [ID,NAME,DEPT

1,AA,10

2,BB,20

3,CC,30

];

Dept_Map:

mapping

Load * Inline[ DEPT,DNAME

10,DDD

20,EEE

30,FFF

40,GGG

50,HHH

];

New_Table:

Load

*,

applymap('Dept_Map', DEPT, 'Yet to Assign') as DNAME

Resident Base_Table;

Drop table Base_Table;

alkesh_sharma
Creator III
Creator III

In the dimensions - Add calculated dimension

=IF(ISNULL(DNAME), 'Yest to assign', DNAME)

sujeetsingh
Master III
Master III

Carly has given you the one best and optimized way to implement this by Applymap() function.

You can even use Left join too.

Table1:

Load * Inline [ID,NAME,DEPT

                       1,AA,10

                         2,BB,20

                         3,CC,30

];

Table2:

Load * Inline[ DEPT,DNAME

                      10,DDD

                      20,EEE

                     30,FFF

                    40,GGG

                    50,HHH

];

Left join(Table1)

load 

DEPT

,DEPT as Dept2

,DNAME

resident Table2;

drop table Table2;

Data:

Load *

,if(DEPT<>Dept2,'Yet to be Assigned') as Department

resident Table1;

drop table Table1;

Chanty4u
MVP
MVP

=if((Dname)='-','yet to assign',Dname)