※この記事は英語版を翻訳しており、一部に機械翻訳を含むため内容は後日更新される可能性があります。最新の内容は英語版を参照してください。表示言語は画面右下の言語名から切り替えられます。
Salesforce で特定の日付から別の日付までの経過日数をレポートに表示したい場合、行レベルの数式を使用するか、複数のレポートで再利用するために数式項目を追加することで、2 つの日付間の日数を簡単に算出できます。
行レベル数式:
1. レポートタブを開きます。
2. 新規レポートボタンをクリックします。
3. 対象オブジェクトのレポートタイプ(リードなど)を選択します。
4. [レポートの開始] を選択します。
5. [列] のドロップダウン矢印をクリックし、 [行レベルの数式を追加] を選択します。
6. 列名を入力します。
7. 最初の日付項目を選択し、別の日付項目からそれを引くことによって数式を作成します。
8. [検証] を選択します。
9. [適用] をクリックします。
数式項目:
1. [設定] に移動します。
2. [オブジェクトマネージャ] に移動します。
3. 対象オブジェクトをクリックします。
4. [項目とリレーションシップ] を選択します。
5. [新規] ボタンを選択します。
6. [数式] を選択し、 [次へ] をクリックします。
7. [項目の表示ラベル]を入力します。
8. [数式の戻り値のデータ型] に [数値] を選択し、 [次へ] をクリックします。
9. [項目の挿入] 画面で、最初の日付項目を選択し、別の日付項目を引き算します。
10. [構文を確認] をクリックします。
11. [次へ] を選択し、[保存]クリックします。
注意:
** [日付] 項目のデータ型が [日付/時間] である場合は、数式関数 DATEVALUE(expression) を使用します。
** &BR() 関数では、行レベル数式で使用される項目の可用性が制限されるため、数式項目を作成しているときはこの関数の使用を避けてください。
数式項目の作成
日付数式のサンプル
行レベルの数式の記述
日付数式のサンプル - 日付と時刻を含む
必要な数式が見つからない場合は、Trailblazer Community グループ - Formulas - Help, Tips and Tricks をご覧ください。
000393431

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.