Hi Jane,
This can be achieved by creating an input ready formula variable. Add a key figure structure and create a formula, edit the formula and then in the bottom left create a new formula variable, then edit this. Make sure it is input ready and select the correct data type.
The add this formula variable to the formula and multiply by the key figure which contains the number of failures.
If you need more detailed instructions then please let me know.
Thanks
Mike