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
61 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 13,860 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,200 points
919 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,470 points
64 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,200 points
1,371 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
67 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,200 points
36 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,470 points
45 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,470 points
58 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,200 points
1,543 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
• 13,860 points
31 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
• 13,860 points
51 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.