Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use of the NORMDIST function

Hi,

Looking for some help on the use of NORMDIST.

Using this expression -

POW



(e(),-(SQR((AHT-AVG(ALL AHT))/SQRT(SUM(ALL AHT)/COUNT(ALL AHT)-1))))

I am able to plot a normal distribution curve, however, having converted my formula to this -

NORMDIST(AHT, AVG(ALL AHT), SQRT(SUM(ALL AHT)/(COUNT(ALL AHT)-1)))

to use the inbuilt function I cannot replicate the graph.

Any assistance with this would be appreciated as I feel I should be using the function where it is available.

Thank you



8 Replies
danielrozental
Master II
Master II

Try this

NORMDIST(AHT, $(=AVG(ALL AHT)), $(=SQRT(SUM(ALL AHT)/(COUNT(ALL AHT)-1))))


Not applicable
Author

Hi Daniel,

I neglected to mention that I am still running QlikView v8.5. I'm afraid although it shows the expression as OK it does not appear to like it as the code turns red.

If it is executing the instruction it is still giving me identical results as per my previous expression.

Time for an upgrade methinks.

danielrozental
Master II
Master II

QV 8.5 shouldn't make any difference. Try normdist(AHT,AVG(total AHT),SQRT(SUM(total AHT)/(COUNT(total AHT)-1)))

Not applicable
Author

Hi Daniel,

Afraid that formula produces the same results as NORMDIST(AHT, AVG(ALL AHT), SQRT(SUM(ALL AHT)/(COUNT(ALL AHT)-1))) .

This produces a graph more akin to an exponential curve than the Normal Distribution curve I am trying to replicate.

danielrozental
Master II
Master II

Sorry, got it all wrong, thought the formula wasn't working for you.

Normdist returns an accumulated value, I don't think you're going to be able to plot a normal curve using that.

If AHT means Average Handling time then you should probably use class(AHT, 0.1) as dimension and count(AHT) as expression (or something like that).

johnw
Champion III
Champion III

Not sure if this is at all applicable to your case, but in the attached example, I've unaccumulated the normdist() function by using normdist(Value)-normdist(above(Value)). That would be yield a normal distribution curve, right? It's been too long since I've had statistics, but it looks like a nice bell shape.

Not applicable
Author

Hi Folks,

I have been unable to make this work using NORMDIST. With a bit of luck I have posted the .qvw with the data and my own method of resolving the issue using the expression


POW

(e(),-(SQR((AHT-AVG(ALL AHT))/SQRT(SUM(ALL AHT)/COUNT(ALL AHT)-1))))


I suspect that the example above of John's worked because the mean was zero. It does produce a nice bell curve though Big Smile

Any further assistance on getting this working using the NORMDIST function would be appreciated.

johnw
Champion III
Champion III

Well, I've extended my expression to handle your data. It sort of works, and I'm even thinking that your current approach just isn't right. Your current approach gives a VERY narrow bell curve, while if you plot the actual distribution of the data, it's a fairly wide bell curve, and my approach follows the shape of it reasonably well, though certainly not exactly. I'm sure I'm missing something in regards to the scale, but I just multiplied my result by 600 so it would plot on approximately the same scale as yours. Here's what I have:

600*(normdist( AHT ,avg({1} total AHT),stdev({1} total AHT))
-normdist(above(AHT),avg({1} total AHT),stdev({1} total AHT)))
/(AHT-above(AHT))

It looks like your actual distribution peaks earlier than the average, and then has a longer tail. In other words, your actual distribution is skewed to the right, so does not appear to be a normal distribution, and might be better modeled by some other distribution. Hmmm, doesn't look like a log normal distribution. It just has skew. Hmmm, some Pearson distribution? Ugh. Anyway, at this point, I'm doing nothing but reading Wikipedia and providing no insights of my own, so it might as well be you reading Wikipedia since you know better what you're after.

And honestly, I see no problem with you calculating it yourself instead of using normdist(). If the formula is straightforward, why not? Just make sure the results are reasonable.