Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

calcuculating the normal distribution of a column as an output in a new column

CamodCPA
8 - Asteroid

Hello all,

 

I am trying to complete some work previously done in excel--in Alteryx.

 

I have run across the data investigation distribution analysis tool, but I need to export this file as an excel output and need the records in tabular format.

 

I have a simple set of data per employee. Like this

 

EmployeeCount
b6
c7
d1
e2
f8

 

 

and need a simple output of this (similar to the Norm.Dist function in xlxs)

 

EmployeeCountNormDist

b

6x
c7x
d1x
e2x
f8x

 

 

Let me know what you all think!

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

Three ways I know of:

 

1. Use the Python Tool. Something like:

from ayx import Package
Package.installPackages(['pandas', 'scipy'])

 

from ayx import Alteryx
import scipy.stats
df = Alteryx.read("#1")
def addProb(row):
    return scipy.stats.norm(0, 1).cdf(row['Count'])
df['Prob'] = df.apply(addProb, axis=1)
Alteryx.write(df, 1)

 

2. Use the R Tool (havent written in ages...)

3. <ShamelessPlug> Install Alteryx Abacus functions and then you get a NormDist function </ShamelessPlug>

 

Attach sample of 1 & 3

 

Labels
Top Solution Authors