My dataset looks like this and it has several demographic variables, question variables, and a 'WEIGHT_W93' variable. When I ran the following in SPSS to get the unweighted crosstabs
WEIGHT OFF.
CROSSTABS
/TABLES= F_AGECAT BY NEWSPLAT_a_W93
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ
/CELLS=COUNT ROW COLUMN TOTAL.
my output is this:
To get weighted crosstabs in SPSS, I run this:
WEIGHT BY WEIGHT_W93.
FREQUENCIES
/VARIABLES= NEWSPLAT_a_W93
/FORMAT=AVALUE TABLE.
to get the following:
In Tableau, however, there has been some slight to minor differences in the unweighted and weighted frequencies. For unweighted frequencies, what I do is to create a calculated field unweighted
sum([Qkey])/total(sum([Qkey]))
but my output looks slightly different:
For weighted crosstabs, I create this calculated field weighted using this:
sum([Weight W93])/total(sum([Weight W93]))
to generate crosstabs that look slightly different from the SPSS version:
Why is this the case? What am I doing wrong?
@Evelyn Ng
Hi, I think there is some kind of rounding problem in SPSS:
In this case, you may take the age category (18-29), Row Percentage:
21.8% + 32.9% + 32.2% + 12.7% + 0.5% = 100.1%
So probably, this would explain the small differences you are getting.
If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.
Regards,
Diego Martinez
Tableau Visionary and Forums Ambassador