Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
Showing results for 
Search instead for 
Did you mean: 
Specialist II
Specialist II

TTest - mean of frequencies instead of field

Hi All,

I am trying different ways of implementing statistic tests in my projects - at the dashboard level- not in the scripting.

I am mainly using the TTest - in particular the function ttest_sig( Group, Value ).

According to the manual the field Value is where this function calculates the mean (and the difference between the 2 Groups).

This works fine if you have metric data like e.g. volume, sales,...

What if you need to calculate the difference of frequencies e.g. Is the count of Product A in this group higher than in the other group? And what about Product B and C...? Has anybody succeeded in solving this using statements/set analysis?

I expected that I could use an aggr-function as the Value field ...something like aggr(Count(ID),Products,Groups)

Although QlikView seems to accept the aggr-function as Value field, nevertheless the result is incorrect.

I found a way to workaround in scripting a crosstable, where I count a case/person as 1 if he has the product and 0 if not. As the crosstable offers me an attribute-field (Products) and data-field - I can simply use the datafield as the Value and the attribute-field as my table-dimension. But in fact this would mean a lot of extra-scripting if I always I have to script extra-crosstables for each single field.

Would be interested in hearing about your experiences and suggestions.

All the best