• Resolved danielvasilios

    (@danielvasilios)


    First of all I’m very sorry if this has been asked before or if it the solution is very obvious but after trying for hours I just wanted to see if anyone knows the solution.

    I have a field where there are three possible entries:
    1 billet
    2 billetter
    Ingen billetter

    I would love to make a short code that delivers the SUM of all the “1” and “2”‘s

    I hope that makes sense 🙂

    Best regards
    -Daniel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    I made this data set:

    
    your-field
    1 billet
    2 billetter
    1 billet
    1 billet
    Ingen billetter
    2 billetter
    2 billetter
    Ingen billetter
    Ingen billetter
    Ingen billetter
    1 billet
    

    Using [cfdb-value] then:
    [cfdb-value form="sum-with-text-example" show="your-field" trans="your-field=intval(your-field)" function="sum"]
    Gives:
    10

    try also:
    [cfdb-table form="sum-with-text-example" trans="SummationRow(your-field)"]
    Transform to Compute Statistics

    Thread Starter danielvasilios

    (@danielvasilios)

    Brilliant! Exactly what I was looking for..

    I can see that I need to study this plugin even more, it is crazy powerful!

    Thank you kindly!

    best regards
    -Daniel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Parsing numbers from field and getting SUM?’ is closed to new replies.