[英]Comparing two rows in Alteryx and Consider only one to the further steps
I have a dataset with similar rows but except one column value will be different.我有一个具有相似行的数据集,但除了一列值会有所不同。 I want to consider a row with specific value in that column and use it in the further steps.我想考虑该列中具有特定值的行,并在进一步的步骤中使用它。
If you see the data there are rows with duplicate ID's and names but different Status.如果您看到数据,则存在具有重复 ID 和名称但状态不同的行。 How can I achieve this.我怎样才能做到这一点。
I have tried using multirow formula but was not achieving anything.我曾尝试使用多行公式,但没有取得任何成果。 Any help will be appreciated.任何帮助将不胜感激。 Thanks a lot非常感谢
There several ways to do this.有几种方法可以做到这一点。 If "Active" is alphabetically the first of the possible statuses, the easiest way would be to sort on ID and Status;如果“活动”是按字母顺序排列的第一个可能状态,最简单的方法是按 ID 和状态排序; then run through the Unique tool and select ID there: it will uniquely select the first ID it sees, which will be the 'Active' one when there's an active case (due to the sort).然后通过 Unique 工具和 select ID 在那里运行:它将唯一地 select 它看到的第一个 ID,当有一个活动案例时,这将是“活动”的 ID(由于排序)。 If you don't want to trust "Unique" you could accomplish the same thing with the Sample tool to grab one item when grouped by ID: again due to the preceding sort, that will grab Active when it is present.如果您不想信任“唯一”,您可以使用 Sample 工具完成相同的操作,以便在按 ID 分组时抓取一个项目:再次由于前面的排序,当它存在时将抓取 Active。 (Aside: if your possible statuses are such that the sort trick won't work, simply create a new variable that will help you sort to 'Active' appearing first in a group-by-ID.) (此外:如果您的可能状态导致排序技巧不起作用,只需创建一个新变量,该变量将帮助您排序为“活动”,首先出现在按 ID 分组中。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.