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
16 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

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
• 13,940 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
• 13,940 points
30 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
287 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
12 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
27 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,200 points
51 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
• 830 points
29 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
• 830 points
46 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,940 points
31 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
• 13,940 points
11 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.