if/then calculation

Comments

1 comment

  • Admin/Client Portal

    This should work. It's pretty easy. You just need to give every category option the percentage you'd like to see, then add them together and multiply by your number. It would be far more difficult if you had multiple options that, when combined, wouldn't equal 100% 

    var rItem = @Category;
    var SelectionA = rItem.indexOf ("a") >= 0 ? .40 : 0;
    var SelectionB = rItem.indexOf ("b") >= 0 ? .60 : 0;
    (SelectionA + Selection B) * @Number)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk