LoginSignup
0
0

More than 1 year has passed since last update.

Summary-Level Formula Column

Last updated at Posted at 2022-07-07

日付の対応

元の質問 : Compare two date fields

IF(Lead.MQL_Date__c < DATEVALUE("2022-07-01") , 
Lead.MQL__c:SUM/28, Lead.MQL__c:SUM/24)

上記の数式ですが、このエラーになります。
Incorrect parameter type for operator '<'. Expected Object, received Date

色々フィールドを変えてみると、どうもDATEVALUE("2022-07-01")がObjectでないということみたい。しかしそうしたらLead.MQL_Date__cはオブジェクトかな?

更にHelpをよく探してみると、あああ、日付型には対応してないようですねぇ。

Get the Most Out of Summary Formulas: Tips, Limits, and Limitations

Functions for use with summary formulas in reports are available under the function category. Select a function, then click Help on this function for information.

Summary level formulas don’t support date or date-time functions or fields.

困ったなぁ。結果が数値のものしか受け付けないような感じです。
となれば、SUMを使って上記のIF文を成立させるしかない

まずは、数式フィールド(数値)を作ります。
これで、条件が一致した時はSUMをしても0なので判断できます。

IF(MQL_Date__c < DATEVALUE("2022-07-01") ,0,1)

Summary-Level Formula Column には以下を設定します。みごとに思った通りになりました。

IF(Lead.isMQL:SUM = 0 , Lead.MQL__c:SUM/28, Lead.MQL__c:SUM/24) 

数式が使えない

CASEは機能しません。

image.png

IFはエラーにはならないですが、判定に違和感がある
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0