Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Plotting bell curve/normal distribution/Gaussian

 

Hi, I havent been having any luck wih my normal distribution graph, 

When I view my chart in table format these are the values that I have for some reason there is an error calculating the values around the mean

FrequencyNormal FrequencyNormal Frequency
-20 <= x < -1510.000338372-
-15 <= x < -1010.0093220850.028161867
-10 <= x < -56--
-5 <= x < 028--
0 <= x < 586--
5 <= x < 1029--
10 <= x < 155--
15 <= x < 203--
20 <= x < 2510.002968246-
25 <= x < 3010.0002277470.007159788
30 <= x < 3511.6E-50.000422699
40 <= x < 4511.5E-92.7E-5
45 <= x < 5011.4E-101.6E-9
-20--

The first Column is the dimension - class(salesInc,5)

2nd colomn expression - expression count(distinct salesId)

3rd column -normdist( salesInc,avg({1} total salesInc),stdev({1} total salesInc),0 )

4th comumn - (normdist( salesInc ,avg({1} total salesInc),stdev({1} total salesInc))
-
normdist(above(salesInc),avg({1} total salesInc),stdev({1} total salesInc)))*
Count(DISTINCTsalesId))

I got help with these formulas from a previous post

http://community.qlik.com/message/285822#285822

1 Reply
MVP
MVP

Re: Plotting bell curve/normal distribution/Gaussian

That's probably because salesInc is ambiguous for all classes with a frequency higher than 1.

If you want a sampling point in the center of your class width, try maybe

(floor(salesInc,5)+ceil(salesInc, 5))/2

like

normdist( (floor(salesInc,5)+ceil(salesInc, 5))/2,avg({1} total salesInc),stdev({1} total salesInc),0 )

edit:

Ah, the same problem will persist using just floor() or ceil() function. Hm, maybe:

normdist( (floor(min(salesInc),5)+ceil(min(salesInc), 5))/2,avg({1} total salesInc),stdev({1} total salesInc),0 )

or

normdist( only((floor(salesInc,5)+ceil(salesInc, 5))/2),avg({1} total salesInc),stdev({1} total salesInc),0 )

Community Browser