Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use chi2test_p function

I'm trying to use the chi2test_p function to determine the statistical significance of a data set.

First, I got it to work when using a very simple data set as follows:

ImpressionResultCount
Control GroupSuccess1
Control GroupFailure2
Test GroupSuccess2
Test GroupSuccess2

If I import this as a table, using this expression produces the correct result: =chi2test_p(Impression,Result,Count)

However, my actual data table imported into qlikview is not pre-aggregated, so it's formatted more like this:

ImpressionResultCustomerID
Control GroupSuccessA
Control GroupFailureB
Control GroupFailureC
Test GroupSuccessD
Test GroupSuccessE
Test GroupFailureF
Test GroupFailureG

I tried using this expression: =chi2test_p(Impression,Result,Count(CustomerID). This produces an error: "Error: Error in expression: Nested aggregation not allowed"

Any thoughts on what I can do in my working sheet to get the chi2test_p to work?

I've attached the "broken" QVW in case that helps.

0 Replies