Changing text in another component

Hey folks. Is it possible to change the text in one component using an On Click event in another component? If not, is there another way to do it?

Basically, I’m trying to create a ‘calculator’ UI, and when a user clicks a button I want the number value to change in the “Total” field.

Thanks, I’m a noob to the prototyping magic in Figma.