QlikWorld 2020 Global Conference. Join us to discover how to get the most from your data. Act fast. Register now and save.

fieldvaluecount - 指令碼函數

此指令碼函數會傳回欄位中相異值的數字。fieldname 必須指定為字串 (例如引用常值)。

Syntax:  

fieldvaluecount(fieldname)

Example:  

在此範例中,會在 RegionCount 變數中計數及儲存區域數目。然後,當您需要知道現有區域的數目時,此值 (在此案例中是 2) 可用於進一步轉換。

LOAD * INLINE

[ Region, Year, Month, Sales

South, 2014, June, 645

North, 2014, May, 245

North, 2014, May, 347

North, 2014, June, 127

South, 2013, May, 367

South, 2013, July, 221 ];

 

Let RegionCount = FieldValueCount('Region');