

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dimension of type dual
Hello
I'm preparing a dimension in the script as follows:
when I use it in a pivot table I'm not getting the descriptions, but the number values
how to display text value of this dimension?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this happens when the numeric aspect of your dual field includes nulls. I'd suggest replacing the null with e.g. Dual(Null(),-999) which should then use the text portion.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to replace the Null() expression below with Dual(Null(),-999) like suggested


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this happens when the numeric aspect of your dual field includes nulls. I'd suggest replacing the null with e.g. Dual(Null(),-999) which should then use the text portion.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
there are no rows with null values
the if else cover all possible cases


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your screen capture is clearly showing that there is a null, and there's clearly a null() at the end of your outermost if() statement..?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Or is right, this is due to your NULL value, and more precisely, to the fact that this value is the first one encountered by the script when loading the data.
If you are doing something like this:
testtable:
Load dual('test',1) as test autogenerate 1;
Load null() as test autogenerate 1;
[test] will be displayed with the label.
If you are doing this:
testtable:
Load null() as test autogenerate 1;
Load dual('test',1) as test autogenerate 1;
[test] will be displayed as a number.
So use the trick given by @Or or sort your data.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My expression is something like:
sum(
{
<condition1>
+
<condition2>
}
field
)
condition 1 returns all that do not have values
condition 2 returns all that have values
under condition 2 no records have null for this dimension


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And yet your screen capture is clearly showing that the dimension has null values...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yeah but not in the script
but the result of the expression


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I'm afraid one of us isn't understanding what the other is saying...
If you've tried my suggestion and it didn't work, then perhaps you need to supply more information and/or a sample app demonstrating the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to replace the Null() expression below with Dual(Null(),-999) like suggested
