Loading

How to Display Cumulative Totals up to a Specific Year and Month

Date de publication: Apr 13, 2024
Tâche

How to display cumulative totals up to a specific year and month?

Étapes
Below is an example of displaying cumulative totals up to the year and month specified in the parameters using Sample-Superstore data.
User-added image

1. Create the parameters as follows;
 User-added image User-added image
2. Right-click Select year and Select month parameter, and select Show Parameter.
3. Create a calculated field and name it Total sales up to specific year and month.
IF ATTR(DATEPART('year', [Order Date])*100 + DATEPART('month', [Order Date])) <= [Select year]*100 + [Select month]
    THEN RUNNING_SUM(SUM([Sales]))
ELSE
    0
END
4. Add YEAR(Order Date) and MONTH(Order Date) to Columns.
5. Add Total sales up to specific year and month to Rows.
Numéro d’article de la base de connaissances

001469516

Pièces jointes

sample.twbx

1189 KB

 
Chargement
Salesforce Help | Article