Calculating total value based on category variables

Comments

8 comments

  • Phong To

    picture of the category questions:

    http://imgur.com/BQQ63tA

    0
    Comment actions Permalink
  • Rainer Grabowski (FVM)

    Hi,

    you can do it this way in your calculation field:

    var roofCat = @roof needs repair;
    var doorsCat = @doors ...;
    var exteriorCat = @exterior ...;
    
    var roofVal = roofCat == "Good" ? 100 : roofCat == "Minor Repair" ?  200 : roofCat = "Major Repair" ? 300 : roofCat ==   "Replace" ? 1000 : 0 ;
    var doorsVal =  *(like for roofVal)*
    var exteriorVal = *(like for roofVal)*
    
    roofVal + doorsVal + exteriorVal
    

    Rainer

    1
    Comment actions Permalink
  • Phong To

    Awesome!! works great, thanks Rainer!

    0
    Comment actions Permalink
  • Alex Wren

    Rainer, this is just what I have been looking for!

    Is there any chance you could share the changes needed to allow multiple categories to be selected which then adds the total of each?

    Alex

    0
    Comment actions Permalink
  • Rainer Grabowski

    Hello Alex,

    not sure I understand what you mean. Can you please give an example? 

    Rainer

    0
    Comment actions Permalink
  • Asad Ali

    Hi 

    Did you get anywhere with adding up the totals for this? 

    Heres my code incase anyone can help

    var assetReq = @Assets Required;

    var assetVal = assetReq == "Hero Banner" ? 1.00 : assetReq == "Skinny Banner" ? 2.00 : assetReq == "Email Design" ? 3.30 : assetReq == "MPU" ? 4.00 : assetReq == "Category Banner" ? 5.00 : 0 ;

    assetVal


    Thanks

    0
    Comment actions Permalink
  • Richard Bradford

    Rainer, 

    I have a Category with a multi-select.

    Side Wall Mounts ($395)

    Thule Pro Bar Roof Rack System ($450)

    Rhino-Rack 7' Sunseeker Awning ($299)

    Roadshower 4: 7 Gallon ($399)

    Roadshower 4s: 4 Gallon ($299)

    23ZERO Perrigren 180 Awning ($799)

    Front Storage Lockers ($1200)

    Rock Sliders ($650)

     

    I need a calculation field to sum the totals based on the selections made.    I have a few of these that will need to be calculated in a Grand Total Calculation.

    1
    Comment actions Permalink
  • Justin Cardenas

    Hey Richard - Did you ever figure that out?

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk