GetAlternativeCount - 图表函数
Syntax:
GetAlternativeCount (field_name)
Return data type: 整数
Arguments:
参数 | 说明 |
---|---|
|
包含要度量的数据范围的字段。 |
Examples and results:
以下示例使用两个加载到不同筛选器窗格的字段,一个用于 First name 名称,另一个用于 Initials。
示例 | 结果 |
---|---|
假定选择 John(在 First name 中)。 GetAlternativeCount ([First name]) |
4,因为 First name 中有 4 个唯一的排除(灰色)值。 |
假定已选择 John 和 Peter。 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 '|');