Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there qlikview community,
I have used aggr and set analysis to product my expression which is:
Aggr(Count({<SensorValue={"= SensorValue>= HighControlLimit"} + {"= SensorValue<= LowControlLimit"}>}SensorValue),ValidatorUnit,Sensor,SensorParam)
The problem is that my expression does not behave as intented.As you can see in the attached pictures below it works perfectly when i select onle one sensor
but it gives me some null values when i sellect all of them.
Any idea why this is happening???
Hi
Are HighControlLimit and LowControlLimit field names?
If they are, then your expression is comparing SensorValue with the entire list of values, which does not work as you see. When you make a selection, then SensorValue is being compared with specific values for the limits and that works.
If I am correct, then I assume that you are trying to compare SensorValue with limit values in the same record. You cannot do this with set analysis. You must either use a Sum(If()) expression, or set a flag value in the load script and use the flag in your set expression.
Hope that helps
Jonathan
Try:
Aggr(Count({<SensorValue={">=$(HighControlLimit)<=$(LowControlLimit)"}>} SensorValue),ValidatorUnit,Sensor,SensorParam)
Unfortunately that did not solve ethe proble ..Insted i got as a result everything null...
I can not think a reason that this expression works for one sellection and not for many.
Hi
Are HighControlLimit and LowControlLimit field names?
If they are, then your expression is comparing SensorValue with the entire list of values, which does not work as you see. When you make a selection, then SensorValue is being compared with specific values for the limits and that works.
If I am correct, then I assume that you are trying to compare SensorValue with limit values in the same record. You cannot do this with set analysis. You must either use a Sum(If()) expression, or set a flag value in the load script and use the flag in your set expression.
Hope that helps
Jonathan
Yes you are right Jonathan HighControlLimit and LowControlLimit are field names...Aha that is why..Happy to
managed to sort out the logic on that.