countIf
根據條件陳述式,countIf 函數會計算維度或量值中的值數量 (依照選擇的一個或多個維度分組)。
語法
countIf(dimension or measure, condition)
Arguments (引數)
- dimension or measure
-
引數必須是量值或維度。結果會省略空值。常值無作用。引數必須是欄位。
- condition
-
單一陳述式中的一個或多個條件。
傳回類型
Integer
範例
下列函數會傳回符合條件的銷售交易 (Revenue) 統計,包括任何重複項。
countIf ( Revenue, # Conditions CalendarDay >= ${BasePeriodStartDate} AND CalendarDay <= ${BasePeriodEndDate} AND SourcingType <> 'Indirect' )