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

Null values needs to be sorted at last..if replaced with some value

Hello All,

My script is

Mappingtable:

Mapping Load

Id,Region

from excel1;

Table 1:

Load Id,Name,Login Date,countofLogins, applymap('Mappingtable',Id,'Unknown') as Region

from excel2;

Here, since I have used 3rd parameter as Unknown so null values will be replaced with Unknown.

Problem is :

At frontend when I sort my table on the basis of countofLogins..Unknown comes 1st in the Region as it contains the maximum of count.

Is there any way to keep it at last?

Hope I made it clear..

Thanks and Regards,

Ankita

1 Solution

Accepted Solutions
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

maybe you can sort your values by expression, something like this:

count({$<Region-={'Unknown'}>} logins)

so the sort expression will consider all regions except unknown and it should (in theory) place "unknown" at the end of the values

regards

View solution in original post

14 Replies
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

maybe you can sort your values by expression, something like this:

count({$<Region-={'Unknown'}>} logins)

so the sort expression will consider all regions except unknown and it should (in theory) place "unknown" at the end of the values

regards

ankitaag
Partner - Creator III
Partner - Creator III
Author

Sort is only applied on Dimensions, so in which i should put this?

Also it's not working

marcus_sommer

Maybe you used an dual() field for Region which you then sorted numeric:

dual(

     applymap('Mappingtable',Id,'Unknown'),

     applymap('Mappingtable',Id,0)) as Region

- Marcus

ramoncova06
Specialist III
Specialist III

on region

ankitaag
Partner - Creator III
Partner - Creator III
Author

Hello Marcus,

Null values needs to be replaced by Unknown only as per the requirement

ankitaag
Partner - Creator III
Partner - Creator III
Author

I have many dimensions and expressions..Here I have mentioned just 1 expression as count of logins.

I have opportunity no, count of sessions and etc.

I have created an inline where I give these expression names and have placed it in a list box. On the selection basis, I sort the values.

Suppose I select count of logins..sorting is done on the basis of count of logins.

Or I select count of sessions, then the sorting is done on that basis.

Hope I m clear.

Thanks and Regards,

Ankita

ramoncova06
Specialist III
Specialist III

this is based on Jamie option

where the sort is done at the dimension level

ankitaag
Partner - Creator III
Partner - Creator III
Author

Help!

ramoncova06
Specialist III
Specialist III

you have to promote the region (or whatever you want to use for sorting)