Loading

Excluding Null Values from Running Total

Publiceringsdatum: Apr 13, 2024
Uppgift
How to create a running total that does not extend as a flat line past the dates that have actually occurred.
Steg
The steps below are also outlined in the attached package workbook found to the right of this information in the "Attachments" section.
  1. Select Analysis > Create Calculated Field to create a calculated field.
  2. In the Calculated Field dialog box that opens, type a name for the field.
  3. In the formula field, create a calculated field similar to the following and then click OK:
    IF NOT ISNULL(SUM([<Field>])) 
    THEN RUNNING_SUM(SUM([<Field>]))
    END

    where <Field> is the field that is used in the running total quick table calculation.
  4. Create similar calculations for all measures in the view that are being calculated as running totals.
  5. Replace the running total quick table calculations in the view with the newly created calculated fields.

If the flat line shows at zero, then do the following:
  1. Right-click the calculated field in the view and select Format... If the view contains multiple measures, then right-click Measure Values and select Format...
  2. In the left-hand Format pane, under Special Values, in the Marks dropdown select Hide (Connect Lines)
Ytterligare resurser
Note: This solution will work if you have rows/dates in your data set that don't yet have numeric data. For example, a skeleton transaction table with future dates in the year listed, but empty sales data until transactions have occurred. See the attached sample workbook to the right of this text in the "Attachments" section for an example.

To see these steps in action, watch the video below. 
Note: Video is silent. 



 
Knowledge-artikelnummer

001458232

Bilagor

Excluding Null Values.twbx

74 KB

 
Laddar
Salesforce Help | Article