The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts
I am getting the following erro on this simple bit of R Script, canot see what i have done wrong (see image with error message below)
Sheet1 <- data.frame(PRIMARYTOOUTCOMEYEARS, OUTCOMETYPE)
Sheet1 <- unique(Sheet1)
time_tot <- (PRIMARYTOOUTCOMEYEARS)
num_rev <- (OUTCOMETYPE)
poisson.test(x=num_rev, T=time_tot, conf.level=0.95)
Solved! Go to Solution.
Hi @Anonymous
As tested, you don't need to write this code again in the code editor.
Sheet1 <- data.frame(PRIMARYTOOUTCOMEYEARS, OUTCOMETYPE) Sheet1 <- unique(Sheet1)
From you code, it seems it will not plot a visual but calculate the Poisson distribution based on two columns "PRIMARYTOOUTCOMEYEARS, OUTCOMETYPE".
If my understanding is correct, you can run R script in Power Query.
In addition, there is a function in DAX, does it meet your scenario?
create a new column
Column = POISSON.DIST([PRIMARYTOOUTCOMEYEARS],[OUTCOMETYPE],0.95)
Reference:
R:
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
As tested, you don't need to write this code again in the code editor.
Sheet1 <- data.frame(PRIMARYTOOUTCOMEYEARS, OUTCOMETYPE) Sheet1 <- unique(Sheet1)
From you code, it seems it will not plot a visual but calculate the Poisson distribution based on two columns "PRIMARYTOOUTCOMEYEARS, OUTCOMETYPE".
If my understanding is correct, you can run R script in Power Query.
In addition, there is a function in DAX, does it meet your scenario?
create a new column
Column = POISSON.DIST([PRIMARYTOOUTCOMEYEARS],[OUTCOMETYPE],0.95)
Reference:
R:
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mnay thanks Maggie. Excellent feedback as always. let me test.
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |