我正在尋找一種方法來對一組 1000 行左右的數據進行間隙和重疊分析。數據是團隊將每個功能的測試覆蓋率排名為 1、2 或 3,分數。我想尋找沒有組將其評分為 1 的行之間的差距,並顯示多個組的評分為 1 的位置。數據表的快照如下。
| 特徵 # | FVT | 電動汽車 | 無級變速器 | MSV | GQ | 證書 | 硬件 | 聚乙烯 | MFG測試 | 偏微分方程 | 中醫/FAE? |
| 1 | 1 | | 2 | 3 | | 3 | 1 | 2 | 2 | | |
| 2 | 1 | | 2 | 3 | | 3 | 1 | 2 | 2 | | |
| 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
| 4 | 3 | 3 | 3 | 3 | 3 | 3 | 2 | 3 | 3 | 3 | 3 |
| 5 | 1 | | 2 | 2 | | 3 | 3 | 2 | 2 | | |
| 6 | 1 | | 2 | 2 | | 3 | 3 | 2 | 2 | | |
| 7 | 1 | | 2 | 2 | | 3 | 3 | 2 | 2 | | |
| 8 | 1 | | 2 | 2 | | 3 | 3 | 2 | 2 | | |
我不確定你在找什麼,但這是我寫的一個小腳本,它產生我認為你想要的結果

Names Default To Here( 1 );
dt = Data Table( "MuMover Example" );
colNames = dt << get column names( continuous, string );
Remove From( colNames, 1, 1 );
Remove From( colNames, -2, 2 );
columnsWithNoOnes = {};
For( i = 1, i <= N Items( colNames ), i++,
Summarize( dt, byGroup = By( colNames[i] ) );
If( Contains( byGroup, "1" ) == 0,
Insert Into( columnsWithNoOnes, colNames[i] )
);
);
featureWithMultipleOnes = {};
countOfMutipleOnes = {};
For( i = 1, i <= N Rows( dt ), i++,
temp = Loc( dt[i, Index( 2, 10 )], 1 );
If( N Rows( temp ) > 1,
Insert Into( featureWithMultipleOnes, i );
Insert Into( countOfMutipleOnes, N Rows( temp ) );
);
);
New Window( "Results",
H List Box(
Outline Box( "Groups with No 1's",
Table Box( String Col Box( "Group", colNamesWithNoOnes ) )
),
Spacer Box( size( 15, 0 ) ),
Outline Box( "Features With Multiple 1's",
Table Box(
Number Col Box( "Feature", featureWithMultipleOnes ),
Number Col Box( "Count", countOfMutipleOnes )
)
)
)
);
這是一個計算你想要的公式

If( Row() == 1,
colNames = Current Data Table() << get column names( continuous, string );
Remove From( colNames, 1, 1 );
Remove From( colNames, -2, 2 );
);
display = "";
For( i = 1, i <= N Items( colNames ), i++,
If( Row() == 1,
colNames = Current Data Table() << get column names( continuous, string );
Remove From( colNames, 1, 1 );
Remove From( colNames, -2, 2 );
);
display = "";
For( i = 1, i <= N Items( colNames ), i++,
cname = colNames[i];
Eval( Parse( Eval Insert( "If( ^cname^ == 1, display = display || \!" \!" || colNames[i] );" ) ) );
);
Trim( display );
);
If( display == "",
display = "Gap"
);
Trim( display );