last n days transactions data from dataset

0 votes
How to show last n days transactions data from data set? My data contains login and logout time, duration, etc for teaching and non-teaching staff. I want to show transactions for last n days.
May 22 in Tableau by priya
29 views

1 answer to this question.

0 votes

Hey, 

You can create a calculated column or use filter to show data for last n days transactions.

Using calculated field- create as below

IF DATEDIFF('day',[Date],TODAY()) <N THEN [Date] END

Now drop the above field in visual to see the fields as per 10 last n days.

Using filter - 

Drop the date in filter column and edit the filter as top N( for ex. 10) and select Last date where last date is a calculted field which has code MAX([Date]) to fetch the last N dates.

Hope it helps you.

answered May 22 by anonymous
• 32,260 points

Related Questions In Tableau

0 votes
1 answer

Show data for next n days

Hi, Follow below steps: 1. Make a parameter to take ...READ MORE

answered Apr 5 in Tableau by Anitha
37 views
+2 votes
1 answer
0 votes
1 answer

How to calculate weekly average from daily data?

You can create these calculated fields: Unique Weeks ...READ MORE

answered Jun 26, 2018 in Tableau by Atul
• 10,240 points
540 views
0 votes
1 answer

Performing automatic read and update data source from a web data connector

Dashboard on Tableau Public can only be ...READ MORE

answered Aug 27, 2018 in Tableau by Atul
• 10,240 points
37 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
70 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
208 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
77 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
99 views
0 votes
1 answer

How to get past N months date from data source?

Hi, this is a one solution to your ...READ MORE

answered Mar 1 in Tableau by Cherukuri
• 32,260 points
77 views
0 votes
1 answer

Exclude last month from data set

Hi Peter, Use a condition as below and ...READ MORE

answered May 22 in Tableau by Cherukuri
• 32,260 points
23 views