Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Help

hi All,

i'm need your help please.

how to transform this request in Set Analysis :

if(IsNull(Cal_DAY),SUM(D1_D7)/sum(REG),if(Now()>Cal_DAY+8,SUM(D1_D7)/sum(REG)))

Thanks

9 Replies
dirk_konings
Creator III
Creator III

Hi

You can't do a nested if within SetAnalysis. Checking on NULL is also not possible via SetAnalysis.

SetAnalysis is for making 'Selections' in your expression, not testing a value.

Dirk

Not applicable
Author

but i can use Cal_day={''} to define a null value

dirk_konings
Creator III
Creator III

no, but you could create an extra field in script which has a value 'X' when isnull(Cal_day)

This new field could be checked with SetAnalysis

er_mohit
Master II
Master II

Try this

if(IsNull(Cal_DAY),SUM(D1_D7)/sum(REG),if(Now()>Cal_DAY+8,SUM(D1_D7)/sum(REG)))

if(IsNull(Cal_DAY),sum({<Cal_DAY={" "}>}D1_D7)/sum(REG),

if(Day(today())>Cal_DAY+8,SUM(D1_D7)/sum(REG)))


Not applicable
Author

ok i'll change my field to 'X' when Cal_day IsNull, and then how to write it in Set Analysis ?

it seems that Now() doesnt work

Not applicable
Author

you expression works, but still using IF.

the IF statement seems to refresh my report every 5 seconds, which complicates the use of the chart.

dirk_konings
Creator III
Creator III

You better use Today() because now is the current system timestamp.

Dirk

Not applicable
Author

right !

Not applicable
Author

Up