Expression Tag Calculation

I am attempting to display in Easy Chart a motor’s commanded speed, actual speed, and percent error.
The percent error is calculated by ((Actual Speed - Command Speed)/Command Speed) * 100.
I have created OPC tags for Actual Speed and Command Speed. I then attempted to create an Expression Tag to do the calculation so I can include it in the Easy Chart but I get a little red x showing up on my expression tag in the Tag Browser.

This is my desired expression: {[.]Gravure RPM Flt}-{[.]Gravure RPM SP Flt}/{[.]Gravure RPM SP Flt}*100

Attempting to diagnose, i have noticed the red x appears as soon as I enter {[.]Gravure RPM SP Flt} in the denominator.

Can someone explain what I’m missing and how to correct?

What is the value of {[.]Gravure RPM SP Flt} ? Is it zero?

If it is, division by zero will give you an error.

I now see the error of my ways. Yes, the value of the denominator tag was indeed zero. That was due to not having run yet so no data was acquired.
After running the application data was acquired and the error cleared.
Did I mention I’m really new with Ignition?!

Thanks for the quick reply.

You could check that the value is greater than 0 before you do the calculation to avoid any errors if you wanted:

If({[.]Gravure RPM SP Flt} > 0, {[.]Gravure RPM Flt}-{[.]Gravure RPM SP Flt}/{[.]Gravure RPM SP Flt}*100, 0)