• Resolved souriceau44

    (@souriceau44)


    Hello

    I want to calculate in a column the sum according to a criterion

    Example:
    in the “equipment” table (id = 58)
    the column “Venue” (xxx) I have “Lounge”, “spa”, “Entrance”, etc …
    the column “price” (id = 176) I have the price

    I can make the total sum: [wpdatatable_sum table_id = 58 col_id = 176]

    I don’t know how to sum up just for “lounge” from the column “venue” for example.

    How to do the syntax in the formula?

    thank you in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hello there.

    We’re not sure what you wish to achieve here. Do you want to summarize only the “Lounge” values in that column?

    The plugin can’t do that, if this is what you want to achieve. You can filter the table, so it only displays “Lounge”, “spa”, etc. and in that case, the SUM will display results of a filtered column.

    The only other way of doing what you want to do is to use SQL Query and pull the values only for specific data in the “Venue” column, but that feature isn’t included in the Lite version, so we can’t help you with that.

    Also, writing custom queries isn’t included in the provided support even for the full version of the plugin.

    If we misunderstood, please explain in a bit more detail.

    Kind regards.

    Thread Starter souriceau44

    (@souriceau44)

    Hello

    ok, i see with sql
    have a nice day

    Thread Starter souriceau44

    (@souriceau44)

    ok

    Thread Starter souriceau44

    (@souriceau44)

    ok

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sum according to criteria’ is closed to new replies.