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

Expression enable/ disable

Hi,

I have multiple expressions in my waterall chart.

If I uncheck ENABLE option in chart properties, the right side bar should ignore this particular value in its expression.

If I Check ENABLE option in chart properties, the right side bar should consider this value and calculate accordingly.

HOW CAN I DO THIS HAPPEN.

19 Replies
Not applicable
Author

Yes, after submitting the ques i realized it is not possible...m sorry for that...

thing is i dont have exact field which refers to particular expression in my dimensions.

cos the expression is actually declared as a variable. expr3=50 using the same in my expr3 in chart as $(expr)

Now m lukin if it is possible that,

IF((Not IsnNull(<expr3>)), 'expr4=(expr1-expr2-expr3)', 'expr4=(expr1-expr2)') ?

hope you got my ques....

Not applicable
Author

No problem.

But i guess if you can post your complete actual requirement with some qvw sample document attached, i can try help you on that.

Not applicable
Author

Yes I can do that, but before that please tell me...

if it works to apply condition barely on 'expression' itself wit in the if statement like i explained above?

that way my prob is solved almost....

Not applicable
Author

Yes you can do that but differently by using variables as attached sample.

Sample shows using variables only but you need to use those variables to check if it returns anything otherwise use different expression. Basically u need to build the epxression.

Not applicable
Author

hey pls find the file below...

now my doubt is

>if I disable 'expr3' in the chart properties by unchecking the 'Enable' option  then 'expr4= $(v1)-$(v2)' else  'expr4= $(v1)-$(v2)-$(v3)'

Not applicable
Author

Check the attached.

Not applicable
Author

Thanks a lot buddy.....

Thing is its not working for my actual application... still working on it.

if i m not able to... will sure update the status...

Not applicable
Author

Thanks a lot, and the prob with my application is resolved by renaming the column name......

Thank u so much buddies in helping me out.

Not applicable
Author

Great finally we could do it.

Not applicable
Author

Macro VBS to enable/disable expression:

set chart = doc.GetSheetObject("CH01")

set cp = chart.GetProperties

set expr = cp.Expressions.Item(3).Item(0).Data.ExpressionData

expr.Enable = false

chart.SetProperties cp