使用 3 个变量计算销售价格中位数 Tableau 10

Calculate median sales price with using 3 variables Tableau 10

我想计算纽约市 5 个行政区(布鲁克林、布朗克斯曼哈顿、皇后区和史泰登岛)的公寓的销售价格中值和租金中值。在 Tableau 中,销售和租金是 ListPrice 的组——变量 ListPrice 是 NUMBER(小数)类型(包括销售和租金,Borough

感谢任何帮助

我尝试使用 Tableau 的 table 计算功能,但没有用,我尝试了

WINDOW_MEDIAN(SUM([ListPrice])-1, -1)  

ERROR: WINDOW_MEDIAN is being called with (float, integer), did mean 
(float,integer,integer) 

数据

Type             Borough       ListPrice
RentalType1      Manhattan       ,000
RentalType2      Bronx           ,000
RentalType2      Brooklyn        ,000
SalesType2       Manhattan       0,000
SalesType1       Brooklyn        0,000
SalesType1       Bronx           0,000
SalesType2       Queens          0,000
SalesType2       Staten Island   0,000

Table 计算采用 3 个参数,表达式,分区的第一行和分区的最后一行。在您的公式中,您没有给出分区的最后一行。

运行 每个行政区 type 的函数并计算每个 Borough.

所以你的公式是:

WINDOW_MEDIAN(SUM(INT([List Price])),FIRST(),LAST())

您是否希望获得以下值:

此处计算2为中值