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, 2019 in Tableau by Nithin
16,665 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.

For an in-depth explanation check out Tableau Training Course details.

answered Mar 12, 2019 by Cherukuri
• 33,030 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
9,438 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 9, 2018 in Tableau by ffdfd
• 5,550 points
4,450 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
11,229 views
0 votes
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
4,959 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
1,309 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 ffdfd
• 5,550 points
920 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 ffdfd
• 5,550 points
914 views
0 votes
2 answers

Calculation issue: Distinct sum in Tableau

I feel the easiest way is to ...READ MORE

answered Aug 26, 2020 in Tableau by Dhiraj Kumar Sahu
9,169 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, 2019 in Tableau by Cherukuri
• 33,030 points
468 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, 2019 in Tableau by Cherukuri
• 33,030 points
5,017 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP