Hello everyone!

Using PI compressed data within PI Datalink in Excel I came across the "If then else" function used as a filter expression. I can see what the filter expressions (Filter 1, 2, 3 and 4) are doing, but I cannot find a good explanation how it works behind the scene. It seems like putting "0" into "then" or "else" is the key here. Can someone point me to an explanation?

Hi Stefan,

Below are some Live Library links. Note that your filter expression is the 4th parameter to the PICompFilDat function.

PICompFilDat

Filter Expressions

Expression syntax

Restrictions on data items in expressions

The important thing about filter expressions is from the 2nd link above. The very

firstparagraph states:Your filter expression must return a true or a false. For an integer, any non-zero number is considered true. A zero is always false. Your binary if-then-else must return true-false or false-true. What you have in column N is trying to return true-true.

Can you see if this expression works: TagVal('sinusoid','*'')>15