Loading

Show Last Month's Data on First Day of the Month

Date de publication: May 30, 2025
Tâche
How to filter the view to show last month's data on the first day of the month, otherwise show this month's data.
Étapes
The attached example workbook uses the example data set Superstore to demonstrate the following instructions:
  1. Create a calculated field with a name like "this month or last month filter" with a calculation similar to the following:

    (

    DATEPART( 'day', TODAY() ) = 1

    AND DATEADD( 'month', -1, DATETRUNC( 'month', TODAY() ) ) = DATETRUNC( 'month', [Order Date] )

    )

    OR

    (

    DATEPART( 'day', TODAY() ) != 1

    AND

    DATETRUNC('month', TODAY() ) = DATETRUNC( 'month', [Order Date] )

    )

  2. Drag [this month or last month filter] to the Filters shelf

  3. In the Filter dialog, check True and click OK

Numéro d’article de la base de connaissances

001456782

Pièces jointes

this month or last month filter.twbx

1131 KB

 
Chargement
Salesforce Help | Article