0

Table - grouped by item, sum value, rate?

Hi all, what is the right and easy solution?

Table with fields ITEM_ID / Units. I need formula field called Rate = Units/Sum Of Units per every Grouped Item.

Thanks

3 replies

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    I suppose that "Grouped Item" means that the same value of ITEM_ID may happen in several records. In the formula below, replace "Table1" by the actual name of your table. This will show the total "Rate" for each item in each record.

    If you need a table view, activate the "Grouped" option for the ITEM_ID column, and one of the Min, Max, First or Last options for the "Rate" column. Note that, if you toggle the detail view of a group, each line will show the total "Rate" for the item, and not the contribution of that particular line.

    let Zid := ITEM_ID;
    100 * sum((select Table1)[ITEM_ID = Zid].Units) / sum((select Table1).Units)

    If you need a table view where the details for each line are displayable, use the formula below and, in the table view, activate the "Sum" option for the "Rate" column.

    100 * Units / sum((select Table1).Units)

    • info.21
    • 3 yrs ago
    • Reported - view

    Thanks, but the task is little bit different. Rates should be like "Right RATE"

    • info.21
    • 3 yrs ago
    • Reported - view

    This works:

    let Zid := ITEM_ID;
    UNITS / sum((select Table1)[ITEM_ID = Zid].UNITS)

Content aside

  • 3 yrs agoLast active
  • 3Replies
  • 769Views