-I would like to compare two selections, in each selection, we have a number of consumers N1 for first selection, N2 for the second one. among them there is a number of best customers (n1 fo the first selection and n2 for the second one). I would like to know if selection 1 is significatively better than selection 2, if it contains more best customers (what i mean by selection is when you select different options in the qlikview project, for exemple : age, sex...)
-I thought about using the khi 2 test. The problem is that the syntaxe of this test require a table :
The first idea i had is to write 'col ' and 'row' like a list : chi2test_p( ('selection1', 'selecion2'), ('BestCustomers',' AllCustomers'),(n1,N1),(n2,N2)) but it doesn't work. n1, n2, N1,N2 are dynamics, they changed when we changed selection1 and selection2.
The second idea that i had is to create a dynamique table so i write it like that :
where n1=sum(BestCutomers) for selection 1. but it doesn't work either because when i reload the script, it doesn't take into account the current selection or the saved selections.
I hope my explications are clear. Please help me to find a solution.