SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSAS converts NULL values into string 'NULL'


SSAS converts NULL values into string 'NULL'

Author
Message
SQLnlPro
SQLnlPro
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 94
SSAS converts empty fields into string text 'NULL'. I found out because my report shows NULL as string value. Running the MDX query in SSMS, it shows NULL as well, while other fields remain empty.
I tried all the ppossibilitieswith the NullProcessing option, but with no results.
In report server I covered the result by using the following expresion,
=IIF(Fields!Direction.Value="NULL","",Fields!Direction.Value)
but there must be a better way, am I missing something here?
s_osborne2
s_osborne2
SSC Eights!
SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)SSC Eights! (997 reputation)

Group: General Forum Members
Points: 997 Visits: 2292
Hi,

I've handled Nulls in SSRS reports coming out of SSAS with this sort of expression.

=Iif(IsNothing(Fields!ANYFIELD.Value),"The Field Is Null",Fields!ANYFIELD.Value)

Found here:

http://www.mredkj.com/vbnet/RSNullCheck.html

Hope that helps.


Simon



MCSE: Data Platform
MCSE: Business Intelligence
Follow me on Twitter: @WazzTheBadger
LinkedIn Profile: Simon Osborne
SQLnlPro
SQLnlPro
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 94
Thanks, Simon.
The problem is that the field is not empty in SSAS, it is filled with a string text 'NULL', while it should be empty.
It can be solved in Report server, but SSAS adds the null value for some strange reason. I was wondering if I can change this behaviour of SSAS, because removing it from Report server is'nt a nice solution in my opinion.
MMartin1
MMartin1
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2761 Visits: 2031
I think SSAS does the proper thing by wanting to have all fields defined. In your dimensional database, It is common to put a -1 key to represent a null in your fact tables foreign key fields. SSAS does not like the whole idea of absence of value. Can you provide more specifics to your situation?

Thanks

----------------------------------------------------
How to post forum questions to get the best help
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search