Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group Null values and click them

  Hello all,

I have a graph where the dimension values are null for a lot of values. Is there a way I can group them all into say "null" or "unavailable" so that I can click on this bar and check the underlying data?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Change your script as below

Department:

Mapping LOAD * INLINE [

    ProductID, Department

    1, Computer

    2, Books

    3, Shoes

    4, Supplies

];

LOAD *, ApplyMap('Department',ProductID,'UNKNOWN') as Department INLINE [

    Transaction ID, ProductID

    111, 2

    222, 3

    333, 4

    444, 4

    555, 3

    666, 1

    777, 2

    888, 5

    999, 6

];

View solution in original post

9 Replies
giakoum
Partner - Master II
Partner - Master II

yes in your reload script

if (isnull(dimension), 'N/A', dimension) as dimension

or maybe even use the setnull

MK_QSL
MVP
MVP

You can't just select Null Name in dimension.

use below in your chart/table to create a Calculated Dimension...

IF(IsNull(FIeldName) or Len(Trim(FIeldName))=0,'NoFieldName',FIeldName)

Not applicable
Author

Hi Rav,

You have a few options, I would recommend converting your nulls to real selectable values in your script.

If you are looking for this on a single field, then as Ioannis says, you can just check for nulls on that field.

For a wider conversion on multiple fields you might want to consider map using.

Map_Nulls:

MAPPING LOAD

Null()

,'Null'

Autogenerate 1;

MAP [Field1],[Field2] USING Map_Nulls;

hope that helps

Joe

Not applicable
Author

Hi manish,

Your solution helps me group but does not allow me to filter by clicking on the bar.

Not applicable
Author

A calculated dimension based on null values won't be selectable in the chart no, you'll need a script change to convert your nulls to real values

MK_QSL
MVP
MVP

Please check enclosed file..

Not applicable
Author

Joe,

Thank you for your reply. I would like to add that the dimension values are null because of join between two tables.

I am posting an example here. Can you please use this as a reference to help me figure it out?

MK_QSL
MVP
MVP

Change your script as below

Department:

Mapping LOAD * INLINE [

    ProductID, Department

    1, Computer

    2, Books

    3, Shoes

    4, Supplies

];

LOAD *, ApplyMap('Department',ProductID,'UNKNOWN') as Department INLINE [

    Transaction ID, ProductID

    111, 2

    222, 3

    333, 4

    444, 4

    555, 3

    666, 1

    777, 2

    888, 5

    999, 6

];

Not applicable
Author

Thank you Joe and Manish and ioannis. I wish I can mark all your answers as correct.