Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In a straight table, how do I replace '-' for null value with the word 'Unlisted'?
Example:
Current output
Dimension Revenue
John $20
Brian $100
Fred $45
- $5
Proposed output
Dimension Revenue
John $20
Brian $100
Fred $45
Unlisted $5
Try if(len(trim(Dimension))=0,'Unlisted',Dimension)
But it's better to do this in the script. That will give better performance in the charts. And nulls cannot be selected so replacing nulls with real values if possible is always a good idea.
Try if(len(trim(Dimension))=0,'Unlisted',Dimension)
But it's better to do this in the script. That will give better performance in the charts. And nulls cannot be selected so replacing nulls with real values if possible is always a good idea.
I agree with Gysbert, probably better to move this to the import script. This would also work on import:
if(isnull(Dimension),'Unlisted',Dimension) as Dimension
Best,
Matt
Hi,
If you need this in all the charts then you should do this in script itself, because the calculated dimension has performance issues. As matt suggested do this in the script by using
LOAD
*,
If(IsNull(DimensionName), 'Unlisted', DimensionName) AS DimensionName
FROM Source;
Hope this helps you.
Regards,
Jagan.