Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to replace NULL value as top most value in pivot table?

Hi,

Can anyone suggest me how can I get the replaced NULL value as top most value in pivot table? please see attached. As I replaced the Null Values with 'Not Default UTD' . I would need this at the starting of the column values.

Thanks.

27 Replies
Not applicable
Author

Tried not working.

SunilChauhan
Champion II
Champion II

hi use your field in pplace in wildmatch

there is typo

Sunil Chauhan
Not applicable
Author

sorry I confused here. the field which I have is AgeSummary_March. please explain a bit more

SunilChauhan
Champion II
Champion II

use wildmatch(AgeSummary_March,Null()) in sort expression

the sort order asc or desc from dropdown available

or wildmatch(AgeSummary_March,' ') then sort order asc or dsc

hope this helps

Sunil Chauhan
Not applicable
Author

It sounds like it cant find the file you are trying to load

Not applicable
Author

Is this correct which I am using?


Map1:

MAPPING LOAD * INLINE [

AgeSummary_March,SortOrder

'',1
1 Month,2

1Month,3
2month,4
3months,5
4months,6
5months,7
6months,8
7-11months,9
12months+,10
];

LOAD AgeSummary_March,

     ApplyMap('Map1',AgeSummary_March,10) AS SortOrder

   
FROM Map1;

Not applicable
Author

Map1:

MAPPING LOAD * INLINE [

AgeSummary_March,SortOrder

"1 Month",2

"1Month",3
"2month",4
"3months",5
"4months",6
"5months",7
"6months",8
"27-11months",9
"12months+",10
];

Table1:

LOAD AgeSummary_March,

ApplyMap('Map1',AgeSummary_March,1) AS SortOrder

FROM ;

sudeepkm
Specialist III
Specialist III

Is it possible to post the sample qvw you have?

Not applicable
Author

Thanks. The script is executing. But when I use 'SortOrder' in sort expression it is not showing 'Not Default UTD' in top. Do I need to change anything here?

eduardo_sommer
Partner - Specialist
Partner - Specialist

There is a simple way to do this. Before you load the main table, include the inline load below:

Labels:

Load * INLINE [

AgeSummary_March

Not Default UTD

1Month

1month

2months

3months

4months

5months

6months

7-11monts

12months+

];

It's importante that the name of the column, and the labels are exactly the same as in your table.

In the pivot table (order tab) choose input order. Since the inline load is executed before the load of your table, it will determine the input order.

Let me know if this worked for you.