Welcome Guest! To enable all features please Login or Register.
Go to last post Go to first unread
Alastair Dinning  
#1 Posted : Thursday, April 14, 2011 9:02:19 PM(UTC)
Alastair Dinning
Rank: Newbie

Groups: extranet\Forum
Joined: 4/14/2011(UTC)
Posts: 2

When writing a calculation to look at empty cells, how to I tell Targit "if cell is empty"?
Dan Cowan  
#2 Posted : Friday, April 15, 2011 6:49:48 PM(UTC)
Dan Cowan
Rank: Advanced Member

Groups: extranet\Forum
Joined: 3/22/2011(UTC)
Posts: 4

That can depend on how your cube is configured but in general I would start with something similar:

if sum(d-1,0,m1) = 0 then 0 else sum(d-1,0,m1)*sum(d-1,0,m2)

If you are sure the cell is blank and not a zero value then you can try to update the above formula with:

if sum(d-1,0,m1) = "" then 0 else sum(d-1,0,m1)*sum(d-1,0,m2)

I don't typically run in to null values that aren't replaced as zeros so I may be incorrect with the double quote you might need to use a single quote but I think I'm correct.
TARGIT USA Reseller of the Year 2011!
Proud supporter of YouTARGIT.com and TargitUsers.net

You have to understand business to build a business intelligence solution…
#3 Posted : Tuesday, May 10, 2011 10:05:53 AM(UTC)
Rank: Administration

Groups: extranet\Forum
Joined: 4/7/2011(UTC)
Posts: 514

You can use the count function to determine whether a cell is null (empty/blank).
The count function will only count the non-empty cells. In contrast the allcount function will count the non-empty as well as the empty cells.
So, if you are looking up individual rows in this way: count(d1, 0, m1) - then the count function will return "0" for empty cells and "1" for non-empty cells.

Edited by user Tuesday, May 10, 2011 10:08:32 AM(UTC)  | Reason: Not specified

Ole Dyring
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.



We use cookies to improve your site experience, but they also provide us with information on your use of our website.
To find out more about the cookies we use and how to delete them, see our Privacy Policy. By continuing to browse the site, you are consenting to our use of cookies.