3 Replies Latest reply on Dec 2, 2019 9:16 AM by Nathan Mannheimer

    Chi Square with Tableau + R

    Karim Amjad

      I have some aggregate fields [TL] [TR] [BR] [BL] they all do a distinct count.



      When I try to run this code in Tableau







      r<-data.frame(data.frame(kuta), data.frame(kamina));

      e<- paste(chisq.test(r, correct=F)$p.value)




      My tableau column chiSQ_working just returns ZERO

      If I hard core the parameters I get the same result as above (My tableau just returns ZERO)

      However if I hard code values inside of the R script, the tableau script is able to compute the chi sq p value

      Then the calculation works, but of course it assigns each row the p value


      It seems that Tableau is unable to parse through aggregated numbers to the R script
      What is the fix?