Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
];
yes in your reload script
if (isnull(dimension), 'N/A', dimension) as dimension
or maybe even use the setnull
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)
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
Hi manish,
Your solution helps me group but does not allow me to filter by clicking on the bar.
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
Please check enclosed file..
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?
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
];
Thank you Joe and Manish and ioannis. I wish I can mark all your answers as correct.