Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following data:
section access;
Access:
LOAD * INLINE [
ACCESS, USERID, COUNTRY
ADMIN, ADMIN, *
USER, USER_USA, USA
USER, USER_FRANCE, FRANCE
];
section Application;
Sells:
LOAD * INLINE [
COUNTRY, Vendor, Value
USA, John, 10
FRANCE, Marcel, 20
];
CONCATENATE (Sells)
LOAD * INLINE [
COUNTRY, Value
USA, 50
];
In my application, I want to make a chart with the sum of sells by vendor. But when there is no vendor, I'd like to have the string "OTHER VENDOR" instead of "-" (null).
I made a custom dimension:
=if(isnull(Vendor), 'OTHER VENDOR', Vendor)
It works fine in QlikView Desktop:
fine in QlikView Desktop with web view
but when I use a web browser with Ajax, it doesn't work:
If I turn off the section access, it works.
Have I another way of using a string instead of the "-" when null?
I'm using QV server v11 SR 2.
Hi Martin,
Did you try below yet:
Regards,
Sokkorn
Try this.
NullAsValue Vendor;
Set NullValue = 'NULL' ;
Put this statement in script;
Regards,
Kaushik Solanki
well It's working fine with me both in IE and Ajax.
if still you have the issue you can simple copy your code to backend :
Table:
NoConcatenate
LOAD COUNTRY,
Value,
if(isnull(Vendor), 'OTHER VENDOR', Vendor) as Vendor
Resident Sells;
DROP Table Sells;
This will work for sure
Presentation --> Null symbol
2 problems with this:
- doesn't work with "bar charts" (I don't find the option in "Presentation" tab)
- can't use a dynamic expression (I can write "OTHERS" but not "=count(something) & ' OTHERS'")
Try this.
NullAsValue Vendor;
Set NullValue = 'NULL' ;
With this solution, I always have the "NULL" when null.
I have to mix it with
=if(Vendor = 'NULL', 'OTHER VENDOR', Vendor)
as dynamic dimension.
And modify all my statements where I don't want to display the "NULL" vendrors.
But this helps!
well It's working fine with me both in IE and Ajax.
Can you tell me what is your QV server version?
Which web browser do you use?
I think it's a bug in my QV server version, because there is no reason I have something displayed in QV desktop web view and something different in a web browser.
if still you have the issue you can simple copy your code to backend :
It's not an option.
My real application is way more complicated. The dimension that can be null is not linked to the dimension I use in my expression, I can't replace null values by something else, because the values are null because they don't exist.
You can change it to :
NullAsValue Vendor;
Set NullValue = 'OTHER VENDOR' ;
also as you mentioned your application is more complex just select the Charts where you don't want to mention NULL just Select the Dimention and Check option "Supress whn Value is Null" and edit Expression as if(Vendor<>'OTHER VENDOR', Vendor)
See the attached Screen Shot.
or you can use Sokkorn Cheav (Cambodia) solution
you can represent the values as you want in front End :
as highlighted above :
My QV Server /Developer are version 11 SR1
I tried it with my complex application.
Unfortunately, this doesn't give me the result I expected.
I have a complex model with hierarchy, and it's hard for me to make it simple to pinpoint the problem.
Fact is, sometimes I have null values because the value is empty, sometimes I have null values because the line is missing.
With the "NullAsValue", both are counted as the same, whereas I don't want the missing lines to be counted.
Since rohitkoul don't have the problem with QV server 11 SR 1 and I have it with QV server 11 SR 2, I consider it's a bug.
(different result between QV desktop and Ajax should be considered as a bug)