Need to take window average of last 3 months for my sales

0 votes

Need to take window average of last 3 months for my sales. How to do this?

Apr 22 in Tableau by Ayushi
25 views

1 answer to this question.

0 votes

Hi Ayushi,

Create a calculated field to calculate the Average by using below calculated field.

1. Group all orders for last 3 months using datediff().

IF DATEDIFF('month',[Order_Date],TODAY()) <=2 THEN [Order_Date] ELSE ' ' END.

Put the field in filter and unselect space ' ' from the filter.

2. Create calculated field to calculate avg of sales using WINDOW_AVG(SUM([Sales]))

Hope this helps you.

answered Apr 22 by Cherukuri
• 17,630 points

Related Questions In Tableau

0 votes
1 answer

Need to display monthly data excluding 2 months of data

Hi Anitha, 1. Drag and drop the respective year ...READ MORE

answered Mar 12 in Tableau by Cherukuri
• 17,630 points
36 views
0 votes
1 answer

How can I calculate the median of sales price using 3 variables in Tableau

First let me clarify things for you. ...READ MORE

answered Apr 11, 2018 in Tableau by xyz
• 1,550 points
421 views
0 votes
1 answer
0 votes
1 answer

How to change months for a calendar year

Hey, you can try this & Change ...READ MORE

answered Apr 20, 2018 in Tableau by QueenBee
• 1,810 points
14 views
0 votes
1 answer

How to create a filter based on date range?

You can use this code snippet in ...READ MORE

answered Aug 7, 2018 in Tableau by Nitish
• 630 points
35 views
0 votes
1 answer

How can I convert week into Date(mm/dd/yyyy)?

Right click on your date field, you'll ...READ MORE

answered Aug 9, 2018 in Tableau by Atul
• 10,240 points
77 views
0 votes
1 answer

How to display days data based on date selected in the filter by the user.

You can create a parameter for dates. Select data ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
37 views
0 votes
1 answer

How to merge Year ,Month and date in Order Date in Tableau?

Hi, you can simply drag the Order ...READ MORE

answered Aug 24, 2018 in Tableau by AwesomeSauce
• 860 points
58 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
• 17,630 points
42 views
0 votes
1 answer

How to find first n months profit/sales for a given year

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

answered Mar 8 in Tableau by Cherukuri
• 17,630 points
21 views