Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I have a question using a IF statement in an expression. I'm not sure this is a possible way or even the best way, but after 2 days trying and failing, the time has come to search for expert help.
The case is; In my QlickView I have one row of measurements given from our customers. The name of this row is "Height".
In row 2 I have information of what the height really was after a controll measurement done by my colleagues. The name of this row is “RealHeight”.On top of that, I have a row with tolerances, based on the type of packaging. The names of those two rows are “Tolerances” and “Packaging”.
I want to make a check if the given “Height” from our customers is inside or outside the measurement done by our colleagues +/- the tolerance by setting 1 when the height is outside the tolerances and 0 when it is inside the tolerances.
I’ve tried this IF-statement, but it doesn’t give me the expected result.
SUM(IF((RealHeight + Tolerances) > Height, 0,
IF((RealHeight -Tolerances)< Height, 0, 1)))
Any ideas?
Hi,
try adding more brackets.
SUM(IF(((RealHeight + Tolerances) > Height), 0,
IF(((RealHeight -Tolerances)< Height), 0, 1)))
Does this help?
Unfortunately, the result is the same.
Thanks anyway.
Hi,
Try this
IF(Sum(RealHeight + Tolerances) > Sum(Height), 0,
IF(Sum(RealHeight -Tolerances)< Sum(Height), 0, 1)))
The result appears to be the same.
If I run this statement alone, I've got an correct count for all products outside the maximum tolerances:
IF(Sum(RealHeight + Tolerances) > Sum(Height), 0, 1)
but the combination between maximum tolerances and minimum tolerances would not work.