Skip to main content

My dataset looks like this and it has several demographic variables, question variables, and a 'WEIGHT_W93' variable. Current SPSS user here who has trouble weighing my survey data using Tableau for basic frequencies and cross-tabsWhen 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:

imageTo get weighted crosstabs in SPSS, I run this:

WEIGHT BY WEIGHT_W93.

 

FREQUENCIES

 

/VARIABLES= NEWSPLAT_a_W93

 

/FORMAT=AVALUE TABLE.

to get the following:

image 

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:

imageFor 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:

imageWhy is this the case? What am I doing wrong?

1 answer
  1. Sep 4, 2023, 1:57 PM

    @Evelyn Ng​ 

    Hi, I think there is some kind of rounding problem in SPSS:

    @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.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

0/9000