0

Case ,and function

Hi,

 

Please let me know how to define below query at report level using schema?

CASE WHEN POLIN.MATCHING_BASIS = 'QUANTITY' AND POHDR.TYPE_LOOKUP_CODE = 'STANDARD'
                THEN NVL (POLIN.QUANTITY, 1) * POLIN.UNIT_PRICE
             WHEN POLIN.MATCHING_BASIS = 'AMOUNT' AND POHDR.TYPE_LOOKUP_CODE = 'STANDARD'
                THEN POLIN.AMOUNT
             WHEN POLIN.MATCHING_BASIS = 'QUANTITY' AND POHDR.TYPE_LOOKUP_CODE = 'BLANKET'
                THEN POLIN.UNIT_PRICE * PLLA.QUANTITY
             ELSE 0
        END

Regards,

Hk.

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Can you try this as a formula in Incorta dashboard:

     

    CASE (
    and(POLIN.MATCHING_BASIS = 'QUANTITY',POHDR.TYPE_LOOKUP_CODE = 'STANDARD'),
    (ifnull(POLIN.QUANTITY, 1) * POLIN.UNIT_PRICE),
    
    and(POLIN.MATCHING_BASIS = 'AMOUNT', POHDR.TYPE_LOOKUP_CODE = 'STANDARD'),
    POLIN.AMOUNT
    
    and( POLIN.MATCHING_BASIS = 'QUANTITY' AND POHDR.TYPE_LOOKUP_CODE = 'BLANKET'),
    POLIN.UNIT_PRICE * PLLA.QUANTITY,
    
    0
    )
    Like
      • KHK
      • Wipro
      • Hari_K
      • 3 mths ago
      • Reported - view

      Anurag Malik Thank you Anurag, formula working fine.

      Like
Like Follow
  • Status Answered
  • 3 mths agoLast active
  • 2Replies
  • 33Views
  • 2 Following

Product Announcement

Incorta 4.9 is now Generally Available (GA)!!!