5 Replies Latest reply: Jun 22, 2012 3:39 PM by bharadwaj pavuluri

Set Analysis for field not null and not 0?

Hi community,

How would I make an if statement for not null and not 0?  Here's what I'm trying now:

if(full_value<>0 and 'full_value<>'',full_value)

Regards,

Brandon

• Re: Set Analysis for field not null and not 0?

Hi Brandon,

You can write if statement like the below way

if

(

and

statement1,

statement2

)

and for set analysis:

sum({<your_dimension-=0,isnull(your_dimension)=0>}expression/dimension).

hope this helps.

thank you

Meher

• Re: Set Analysis for field not null and not 0?

the set analysis not zero -=0 isn't working for me.  I remember something like this in the past.

I copied and pasted your code into my document, but it still give s me the big minus sign rather than the little dash.

Is that the problem you think and how would I make the little dash with my keyboard?

• Re: Set Analysis for field not null and not 0?

You know why?  Its because I needed not equal to in an if statement within the set analysis.  Here I can use <>.

My example:

sum({ \$<  QBbalcode={'DIRMATL'},

//QB33={'2001'},

[code3]={'RBIACCT'}

>}full_value)

/

( count({ \$<  QBbalcode={'DIRMATL'},

//QB33={'2001'},

[code3]={'RBIACCT'}

>}if(full_value<>0,full_value))

/

count({ \$<  QBbalcode={'DIRMATL'},

//QB33={'2001'},

[code3]={'RBIACCT'}

>}distinct(if(full_value<>0,full_value)))

)

• Re: Set Analysis for field not null and not 0?

I just started thinking about the solution for ur question.

If it's working then it's great. thanks for saving my time.

If possible can you mark the question as answered so that it helps others to save time.

let me know if you got any issues in this case.

thank you

Meher

• Re: Set Analysis for field not null and not 0?

Hi

You can check the null like below:

if(full_value<>0 and isnull(full_value)=0,full_value)

Btw, if it is a numeric field then the following may also do the work:

if(full_value>0,full_value)

Best regards,

http://quickdevtips.blogspot.com/