我的数据表如下:
Country | Total | Days
A | 56 | 3
B | 23 | 5
C | 22 | 2
D | 90 | BLANK
我想找到包含4个步骤的加权平均值
Step 1 : Multiply Total into Days where Days is not blank (i.e to consider only non blank values). lets name the new column formed "Product:
Step 2 : Take the Subtotal sum of the PRODUCT
Step 3 : Take the Subtotal sum of TOTAL
Step 4 : Step 2 / Step 3
即使在EXCEL上完成,我也无法在Power BI中执行此操作。 有人可以帮我吗?
答案 0 :(得分:0)
您可以创建以下度量-
Measure 2 = DIVIDE(sumx('Table','Table'[Days]*'Table'[Total]), SUM('Table'[Total]))