我在 PowerBI 中有一个名为“Dati Popolazione ATTR”的表,类似于:
Region | Province | Town | Population | Males | Females | Attribute
R1 | P1 | T1 | 1000 | 500 | 500 | A1
R1 | P1 | T1 | 1000 | 500 | 500 | A2
R1 | P1 | T1 | 1000 | 500 | 500 | A3
R2 | P2 | T2 | 2000 | 600 | 1400 | A1
R2 | P2 | T2 | 2000 | 600 | 1400 | A2
R2 | P2 | T2 | 2000 | 600 | 1400 | A3
R3 | P3 | T3 | 1500 | 550 | 950 | A1
R3 | P3 | T3 | 1500 | 550 | 950 | A2
R3 | P3 | T3 | 1500 | 550 | 950 | A3
我想创建一个名为“亲和力”的快速度量。这应该有以下计算:
Affinity = sum of the selected attribute / sum of the selected attribute in absolute terms regardless of any filter
如果我选择任何过滤器,分母不应该改变。
你能帮助我吗?