Skip to Content
avatar image
Former Member

BEx query design to accomodate complex business logic

Hi

I have a business requirement where need to use 2 logic based on the nature of data.

Logic 1:

Raws---- Col1 -Col2 -- Col3


Col4--


Col5

-


(KF1) -(KF2) -(For = KF1 - KF2)-- (For = KF1 * 0.3) (For = Col4 - col3)

G/L acc1 -100 -80 -- -20


70--


50

G/L acc2 -200 -175 - 25


140--


115

G/L acc3 -100 -0


100
70
--


(30)

.

.

G/L accn

Logic 2:

If Col 2 has "0" (please refer to G/L acc3 value in above mentioned example which has 0 value in Col2); Col5 should have value of Col3 instead of formula i.e. Col4 - Col3

The actual result should be as under:

Raws---- Col1 -- Col2 -- -Col3


Col4--


Col5

-


(KF1) -(KF2) -(For = KF1 - KF2) -(For = KF1 * 0.3) -(For = Col4 - col3)

G/L acc1 -100 -- -80


20
70
--


50

G/L acc2 -200 -- -175 -- -25


140--


115

G/L acc3 -100 -- -0


100
70
--


"100" (As per logic 2)

.

.

G/L accn

Please suggest any possible solution.

Thank you for your help and time.

Regards

Anish

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 19, 2004 at 07:02 AM

    for Col5 create a formula like this..

    ( col2 = 0 ) * col3 + (col2 >0 )*(col4-col3)

    this meets your requirement for logic 2.

    hope this helps..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2004 at 09:20 PM

    It worked

    Thank you for the solution.

    Regards

    Anish

    Add comment
    10|10000 characters needed characters exceeded

    • You are thanking a poster for his answer.

      Please next time also give him points.

      See: /people/mark.finnern/blog/2004/08/10/spread-the-love

      This time I did it for you.

      Remember: When you ask a question you also assume the responsibility to assign points.

      Please check your other questions and if the answers were good.

      Spread the love and give some points.

      Thanks in advance, Mark.