In Tableau, How to sum the last 7 days of the value?

0 votes

How to sum the last 7 days of the value from orders? ( Data set used:  Global superstore 2016)

Mar 12 in Tableau by Nithin
792 views

1 answer to this question.

0 votes

It can be achieved easily by creating a calculated field, here is how it goes:

  1. Create a calculated field :
  2. Use calculation:

    SUM(IIF(DAY(TODAY())-DAY([Order Date]) <=6, [Sales], 0))

  3. Then you will get the sum of last 7 days as wanted.

Hope this helps you.

answered Mar 12 by Cherukuri
• 31,840 points

Related Questions In Tableau

0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
2,215 views
0 votes
1 answer

How to calculate the percent of records within a group in tableau?

 You can click the measure SUM(Number of Records) and ...READ MORE

answered May 8, 2018 in Tableau by Atul
• 5,530 points
263 views
0 votes
1 answer

How to count occurrence of value and percentage of a subset in tableau public?

Although it sounds like a fairly easy ...READ MORE

answered Jun 5, 2018 in Tableau by Atul
• 10,240 points
3,603 views
+1 vote
1 answer

How to add grand totals of the bar in Stacked Bar in Tableau

Hi Grim, As you have used reference line ...READ MORE

answered Sep 24, 2018 in Tableau by Machdata
• 340 points
527 views
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
99 views
0 votes
1 answer

How to calculate profit when cost and revenue are in same column?

You can create the following calculated fields: Profit: SUM(IIF([account_category] ...READ MORE

answered Apr 10, 2018 in Tableau by Atul
• 5,530 points
85 views
0 votes
1 answer

Creating a calculated field with LOD expression

Go ahead and try the following three ...READ MORE

answered Apr 20, 2018 in Tableau by Atul
• 5,530 points
118 views
0 votes
1 answer

Calculation issue: Distinct sum in Tableau

SUM( { FIXED [Brand], [Market]: AVG(Target) } ...READ MORE

answered May 8, 2018 in Tableau by Atul
• 10,240 points
2,870 views
0 votes
1 answer

How to get only the last n months action of all my records?

Hi Nithin, You can use Calculated field to ...READ MORE

answered Mar 8 in Tableau by Cherukuri
• 31,840 points
56 views
0 votes
1 answer

In Tableau, how to pass measure/dimension to action filters that are not in the chart?

Hi Sindhu,  You can choose the fields that are ...READ MORE

answered Mar 11 in Tableau by Cherukuri
• 31,840 points
1,035 views