Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jul 21, 2022 09:11 AM
Hi! How do I format total cost with if the checkbox is checked it multiplies the cost by 50% and if the checkbox is unchecked, it keeps the full total amount?
Example: cost= $100, if I check the checkbox it totals the cost to 100*.50= $50; if the box is unchecked it totals the cost to $100
Jul 21, 2022 10:13 AM
The following will multiply the cost by .5 if the checkbox is checked and 1 (no change) if the checkbox is unchecked.
{Cost} * IF({Checkbox}, .5, 1)
Jul 21, 2022 10:42 AM
Thank you so much! Is there a way to add if another check fox is checked it subtracts the entire expense calculating to 0. Ex: Checkbox A (like you just explained) but then for the total cost if Checkbox B is checked then it subtracts the full amount and if it is not checked it keeps the full amount? This is used our expense reporting and for our partnership co-op dollars if it is a co-branded, our partner covers half the cost, if it is fully branded by them they cover the whole expense and if its not co-op at all we cover the entire expense
Jul 21, 2022 11:27 AM
I don’t quite get your wording, so here’s a guess.
“If Checkbox B is filled, subtract the result of the first formula from {Cost}. If Checkbox B is empty, show the cost”.
IF(
{Checkbox B},
{Cost} - ({Cost} * IF({Checkbox A}, .5, 1)),
{Cost}
)
Jul 21, 2022 11:44 AM
Sorry, I will send a screenshot to help explain
the total cost needs to be 0 if full co-op is checked and the total cost needs to be multiplied by 50% if it is checked. If neither are checked it needs to stay the full amount. I tried to use the second formula you send and it is giving me an error.
Jul 21, 2022 11:57 AM
The formula was missing a comma, it has been corrected. But in any event, sounds like the formula you want is closer to:
IF(
{Full Co-Op},
0,
{Cost} * IF({Half Co-Op}, .5, 1)
)
Jul 21, 2022 12:32 PM
This worked. Thank you so much:)