This topic contains 2 replies, has 0 voices, and was last updated by Jhelver Layderos 7 years ago.

  • Author
    Posts
  • #22671

    Jhelver Layderos

    Hi Folks,

    I would like to ask if this is feasible or if there is any function out there that could help me achieve this.

    I am creating a saved search where I would want it to be grouped on a per Department level.

    To illustrate, assuming I have the following list (main line=true):

    Department | Internal ID | Amount Applying Transaction ID | Applying Transaction Amount

    A 1 $100 4 $40

    B 2 $200 5 $75

    B 3 $300 6 $100

    B 3 $300 7 $120

    *There are two lines reflected for transaction with internal ID of 3 as there are two records applied to it

    I would want to achieve the following when I preview the results:

    Department Formula (Currency)

    A $60 ** 100 – 40

    B $305 ** (200 + 300) – (75+100+120)

    * I don't want to add the transaction number/internal id as column

    Using the following formula, I was not able to achieve the desired results:

    max(Amount) – sum(Applying Transaction Amount)

    Results show as follow:

    $5 , derived from 300 – (75+100+120)

    Putting the MAX function appears to consider all transaction on per Department level. Is there a way I can have the sum of all invoices per Department (avoiding the duplicated amounts brought by adding the join fields)?

    Would appreciate all the help!
    This is a cached copy. Click here to see the original post.

  • #22672

    pcutler

    I'm not aware of a way to accomplish this as a single saved search. But you do have some options:

    1. Have two separate columns for amount (max) and applying transaction amount (sum). Then export and do the subtraction in Excel.

    2. Have a developer create a Suitelet script that does the subtraction and presents the results the way you're seeking.

    3. Use SuiteAnalytics Connect to write a SQL query.

    4. Create a custom field on the applying transaction to store the applied-to transaction's amount, so that you won't have to join in the saved search results.

  • #22673

    Jhelver Layderos

    Thanks pcutler for your inputs. I tried to use Keep(), works when amount and applying transaction amount are in separate columns, but when I start to combine them I am not seeing the correct results. Guess I have to abandon this idea for now.

You must be logged in to reply to this topic.