Since you did not attach your twbx workbook with the data included I can't give you a specific solution -but conceptually "Median" works at the record level to determine the number of and the value associated with 50% of the marks above (below ) the median - there is another formula - percentile that you can use -
Percentile (value,.5) will return the Median BUT the value has to be a disaggregate - you can accomplish that by making your Weighted value a FIXED lod expression
Lod expressions return a disaggregated value that can be used in other expressions
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Thank you for your reply. Due to restrictions I can’t share the workbook. Is there any alternate way you can suggest?
I just need to apply weight. We have already a weight variable in our SPSS dataset.
If you need, I can provide you SPSS syntax script, so you can have an idea how the custom table calculates median.