Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Display empty value for 0

Author  Topic 

rockstar283
Yak Posting Veteran

96 Posts

Posted - 2011-08-09 : 18:45:40
I want to display empty value '' wherever there are 0 in my measure..e.g. if SalesForAuguest is 0 then show '' instead of 0

I need to do this because I am using proclarity in which I need to show only those products which have some sales..as my sales are default to 0, proclarity is not able to filter out those measure with 0 values..and it is displaying all the products instead of showing only those products with some sale..

I hope I am being clear with my problem..please help me guys..I need to fix this one :-|

Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-10 : 07:48:35
you can very easily do it in your views which you're using as source in your cubes data source view.
use something like ISNULL(NULLIF(yourfield,0),'') in your view queries to make 0

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rockstar283
Yak Posting Veteran

96 Posts

Posted - 2011-08-10 : 11:25:23
Thank you very much for your reply mate..Solved the problem with following solution
You can script this in the cube

([Measures].[???]) = iif([measures].[???]=0, null, [measures].[???]);

Thanks Paul for the advice :)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-11 : 11:13:58
why should you add MDX for this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -