Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
I'm fairly new to QlikView, so this question may be very basic, but any help would be appreciated.
I have loaded a set of data, and am trying to calculate the standard deviation of the data set as an expression on a chart.
The problem I'm having is that while there are 3 years of data, the field I'm looking at (NBRFld) is null for the majority of the data set (only became valid a few months ago).
When I use:
Stdev( total NBRFld)
It seems to be calculating using all the null values, but I only want to calculate stdev for those with actual values.
I know there has to be a simple way to do this, but the syntax is escaping me. Thanks in advance for your help.
Did you try this expression ? If(not(isnull(NBRFld)),Stdev(total NBRFld)) ?
Did you try this expression ? If(not(isnull(NBRFld)),Stdev(total NBRFld)) ?
OK, this seemed to have worked:
If(not(isnull(NBRFld)),Stdev(total NBRFld)) ?
Thank you...now, can you tell me why this works?
Because, it seems to me that the (isnull) should be inside the stdev somehow...
By writing an if out od the StdDev feature, you will ask Qlikview to run the function only on valid fields. In this case you'll evalaute the field before running stddev function.
Happy that is worked.
Rgds,