cancel
Showing results for 
Search instead for 
Did you mean: 

How to force negate an evaluated value in macro

Former Member
0 Kudos

Hi experts,

I'd like to ask for your inputs how can I force negative values in using macros?

for example, my equation is only to average the row values (all positive) and i want to input the evaluated values to another key figure but showing as negative values?

thanks a lot for your help.

regards,

KP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

May be I don't understand your question, but wouldn't be enough to put your result in a variable and then input the result as

row =

          - LAYOUTVAR_VALUE( 'YOURVARIABLE' )

?

Or the same thing, but putting your calculation directly after the "-" sign, eventually with EVAL( in front of it. Is this what you want to do and it is not working as you expected?

regards,

J.

Former Member
0 Kudos

Hi J,

Exactly. we tried both setup you said but it is not working as expected.

Is there any other functions/operations in which we can negate the values calculated in macros?

thanks!

regards,

KP

Former Member
0 Kudos

If      'YOURVARIABLE' = 10,    - LAYOURVAR_VALUE( 'YOURVARIABLE' ) will put -10 in the target row, unless you defined the ratio as for positive values only.

You should check in RSA1 --> Infoobjects --> Infoobjet supporting your ratio --> Data Type that you are not using an InfObj of type Integer (if so, try quantity instead).

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Krish,

Is the   multiplying the row values by -1 not working???

i.e.

Row  'abc' ( ) = Row 'def ' * -1.

abc = new row

def = avg row

This should work.

Regards,

Anurag

Former Member
0 Kudos

Hi Both,

I have done both configuration in macro but somehow it still doesn't show as negative in the new row..

i have tried this..

- LAYOUTVAR_VALUE( 'VARIABLE' )

EVAL (- LAYOUTVAR_VALUE( 'VARIABLE' ))

LAYOUTVAR_VALUE( 'VARIABLE' ) * -1

still doesn't work..

Former Member
0 Kudos

Hello Krish,

Please check that you have maintained the agg level in the level of Macro step.

Thanks

Anurag