cancel
Showing results for 
Search instead for 
Did you mean: 

Can a Calculated key figure be derived from characteristic value?

Former Member
0 Kudos

Hi,

I would like to know whether BW allows to derive a calculated key figure based on a characteristic value. Let us say we have a row like

PLANT-DAY-INVENTORYQTY

and based on my plant value, I want to have another column 'CALCULATEDSCRAP' which is derived from 'PLANT' and INVENTORYQTY (I know this is a crude example, but will do for my need)

Is there any way in BW to get this logic implemented?

Thanks,

Ajay Das

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

If I understand it right, you want to have some sort of <b>IF</b> statement in your Calculated Key Figures?

Use Crystal Reports w/c is normally shipped with BW to display your report. Crystal Reports can handle complex logics that are not found on BEX.

--Jkyle

Former Member
0 Kudos

Hello,

Bex can handle If statements.

For example:

(( 'Cumulative Value GC' > 0 ) * 'Dummy Key Figure') + (( 'Cumulative Value GC' <= 0 ) * 15)

is

If 'Cumulative Value GC' > 0.

rslt = 'Dummy Key Figure'.

else.

rslt = 15.

endif.

A True condition always evaluates to 1, a False condition evaluates to 0.

Hope this helps

Michael

tom_francis2
Active Participant
0 Kudos

Hi Michael,

This will only work if you are creating your IF statement using other keyfigures. It will not work by default when you want an IF statement based on characteristics. Therefore I suggested to add an attribute to convert the characteristic in a number and use this number for the if logic.

kr,

Tom

Former Member
0 Kudos

Hi Tom,

you answer is absolutely right!

Kind reg.

Michael

Former Member
0 Kudos

Hi Tom,

I have a very similar problem. In my if logic i compare to dates but I don´t understand what you meen by

"Therefore I suggested to add an attribute to convert the characteristic in a number and use this number for the if logic."

For the moment, the condition calculates each field individualy correctly but doesn´t treat them as numbers when aggregating.

Thanks in advance,

Victor.

tom_francis2
Active Participant
0 Kudos

It's a little bit tricky, but I would do it as follows. Add an attribute to plant which is a number (1,2,3...). From this point on onwards, you can use the how-to "How to calculate with attributes...".

Another workaround might be to work with a combination of restricted and calculated key figures. Make a restricted key figure for each plant and combine it in the calculated key figure. We need more detail on your request to help you more in this path...

Tom

Former Member
0 Kudos

Thanks Tom,

Is there a location where I can find this 'HOW-TO' document you mentioned?

Thanks again,

Ajay

Former Member
0 Kudos

Here is the link for your pdf doc...

https://websmp101.sap-ag.de/~sapidb/011000358700001963972003

bye,

Roberto