# Adding two keyfigures of different unit

Hi BW gurus,

I have a scenario in reporting. At a single point of time i have data either for Amount(USD) or Sales Volume(Litre) in the database. In Bex reporting, I need to display only one column by adding Amount and Sales Volume using NODIM but the trick is I have to show the unit information also. How to achieve this. Please see below the example.

Amount SalesVolume New Column

1000USD 0 1000USD

0 100Litre 100Litre

For this, I can add Amount and Sales Volume using NODIM but finally I need to show the unit also. Please guide me asap.

Regards,

Kesavan.

10|10000 characters needed characters exceeded

### Related questions

• Posted on Nov 16, 2011 at 01:05 PM

Hi

Perhaps you could use 'disaply scaling factors for keyfigures' from the Query properties (dispay tab). Units will not be displayed along with KFs but one more row will be seen with units at the top of the result area. Might help?

Regards,

Michael

10|10000 characters needed characters exceeded
• Posted on Nov 16, 2011 at 01:16 PM

Hi Michael,

U understood it wrongly it seems...let me xplain clearly...

At a time, data is available for either Amount or Volume in the database.For ex, If Amount is 100USD, Volume will be 0Litre and viceversa.

So i need a third column by adding Amount and Volume along with unit information. For the above ex, new column result should be 100USD+0Litre = 100USD.

How to achieve this...

Regards,

Kesavan.

10|10000 characters needed characters exceeded
• Hi ,

u have to add the two keyfigure and the result should be in USD. k that is ur requirement simply create a formula and in that write the below logic.

amount + NODIM(LITER)

here u get the result with unit of amount because u applied nodim on liter

Hope u got it,

Thanx & Regards,

RaviChandra

Edited by: Ravichandra.bi on Nov 22, 2011 1:54 PM

• Former Member
Posted on Nov 22, 2011 at 09:21 PM

Try the formula below:

(Amount Sales == 0) * Sales Volume + Amount Sales

This will lead you to give values on New Column for Sales Volume if the valu on Amount Sales is equal to zero.

Then if the value on the Amount Sale is not Equal to Zero, New column will give you the value of Amount sales.

Hope this will help.

10|10000 characters needed characters exceeded
• Posted on Dec 08, 2011 at 06:34 AM

Hi,

If you want to achieve this at Infoprovider level, then you will have to create a routine (Start routine/field routine) for this to populate data in New Column. Logic for this would be -

if (Amount Sales = 0)

New Column = Sales Volume

else

New Column = Amount Sales

You can create a code for the above logic.

And if you want to achieve this at query level (without changing any object in backend) then you can use below formula -

(Amount Sales == 0) * Sales Volume + Amount Sales

here in above formula * means "then" and + means "else". Above formula can be used only when you have either Amount Sales or Sales Volume equals to 0 (atleast one of them).

Regards,

RJ