跳到主要內容

GetAlternativeCount - 圖表函數

GetAlternativeCount() 用來尋找已識別欄位中的替代 (淺灰色) 值的數目。

語法:  

GetAlternativeCount (field_name)

傳回的資料類型: 整數

引數:  

引數
引數 描述
field_name 包含待測量之資料範圍的欄位。

範例與結果:  

下列範例使用載入到篩選窗格的 First name 欄位。

範例與結果
範例 結果

假定已在 First name 中選取 John

GetAlternativeCount ([First name])

4,由於 First name 中有 4 個唯一且排除 (灰色) 的值。

假定已選取 JohnPeter

GetAlternativeCount ([First name])

3,由於 First name 中有 3 個唯一且排除 (灰色) 的值。

假定未在 First name 中選取任何值。

GetAlternativeCount ([First name])

0,因為無任何選項。

範例中使用的資料:

Names:

LOAD * inline [

First name|Last name|Initials|Has cellphone

John|Anderson|JA|Yes

Sue|Brown|SB|Yes

Mark|Carr|MC |No

Peter|Devonshire|PD|No

Jane|Elliot|JE|Yes

Peter|Franc|PF|Yes ] (delimiter is '|');

此頁面是否對您有幫助?

若您發現此頁面或其內容有任何問題——錯字、遺漏步驟或技術錯誤——請告知我們可以如何改善!