带过滤器的 Power Pivot CONCATENATEX 函数
Power pivot CONCATENATEX function with filters
在 PowerPivot 中,我想为每一行的后续 [Year] 查找所有 [Site] 值,查找唯一的 [ID] 和一个显示 "JOINED" 的 [Joined] 标签。一个简单的查找!但是,某些行具有下一个 [Year] 的多个 [Site] 值。我想生成以下 [Destination] 列:
[ID] [Year] [Site] [Joined] [Destination]
A 2012 London London, LA
A 2013 London JOINED
A 2013 LA JOINED
B 2012 Paris Berlin, Madrid
B 2012 Paris Berlin, Madrid
B 2013 Berlin JOINED
B 2013 Madrid JOINED
我现在的公式是:
=concatenatex(
filter(
Table,[Year]=([Year]+1)&&[ID]=earlier([ID])&&[Joined]="JOINED"),
Table[Site],
",")
但是这不起作用。我的公式可能是错误的。有什么办法吗?非常感谢任何帮助!
你很接近。您还需要在 Year
上放置一个 EARLIER
包装器:
Destination =
CONCATENATEX(
FILTER(Table,
[Year] = EARLIER([Year]) + 1 &&
[ID] = EARLIER([ID]) &&
[Joined] = "JOINED"),
Table[Site], ", ")
在 PowerPivot 中,我想为每一行的后续 [Year] 查找所有 [Site] 值,查找唯一的 [ID] 和一个显示 "JOINED" 的 [Joined] 标签。一个简单的查找!但是,某些行具有下一个 [Year] 的多个 [Site] 值。我想生成以下 [Destination] 列:
[ID] [Year] [Site] [Joined] [Destination]
A 2012 London London, LA
A 2013 London JOINED
A 2013 LA JOINED
B 2012 Paris Berlin, Madrid
B 2012 Paris Berlin, Madrid
B 2013 Berlin JOINED
B 2013 Madrid JOINED
我现在的公式是:
=concatenatex(
filter(
Table,[Year]=([Year]+1)&&[ID]=earlier([ID])&&[Joined]="JOINED"),
Table[Site],
",")
但是这不起作用。我的公式可能是错误的。有什么办法吗?非常感谢任何帮助!
你很接近。您还需要在 Year
上放置一个 EARLIER
包装器:
Destination =
CONCATENATEX(
FILTER(Table,
[Year] = EARLIER([Year]) + 1 &&
[ID] = EARLIER([ID]) &&
[Joined] = "JOINED"),
Table[Site], ", ")