Created
February 17, 2020 00:58
-
-
Save JonathanGawrych/47af41f2d5b31af5ec7e7b94da46d975 to your computer and use it in GitHub Desktop.
Do the chitest formula in memory. Assumes the data is in DATA!$A:$K, and that the chi sheet, the top/left row/column references the columns to use (B, C, D, etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =CHITEST( | |
| QUERY(QUERY(Data!$A:$K,"SELECT count(B) WHERE "&$A2&" IS NOT NULL GROUP BY "&$A2&" PIVOT "&B$1, 1), "SELECT * OFFSET 1", 0), | |
| MMULT( | |
| QUERY(Data!$A:$K,"SELECT COUNT(B) WHERE "&$A2&" IS NOT NULL GROUP BY "&$A2&" label Count(B) ''", 1), | |
| ARRAYFORMULA(DIVIDE(TRANSPOSE( | |
| QUERY(Data!$A:$K,"SELECT COUNT(B) WHERE "&B$1&" IS NOT NULL GROUP BY "&B$1&" LABEL COUNT(B) ''", 1)), | |
| QUERY(Data!$A:$K,"SELECT COUNT(B) LABEL COUNT(B) ''", 1))) | |
| ) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment