-
1. Re: Set filter on latest date when workbook open
Zhouyi ZhangNov 1, 2017 4:55 AM (in response to Vinay Nrandralal)
-
2. Re: Set filter on latest date when workbook open
Tushar More Nov 1, 2017 5:03 AM (in response to Vinay Nrandralal)1 of 1 people found this helpfulHi Vinay,
If you are using version before 10.2 then the below thread will give the solution.
Help required to set dashboard filter automatically with the current month
Hope this helps.
~Tushar
-
3. Re: Set filter on latest date when workbook open
Vinay Nrandralal Nov 1, 2017 5:58 AM (in response to Vinay Nrandralal) -
4. Re: Set filter on latest date when workbook open
Tyler Garrett Nov 1, 2017 8:53 AM (in response to Vinay Nrandralal)1 of 1 people found this helpfulDepending on the datasource, I would recommend date functionality handled in the SQL.
Use a subquery in your select statement with Date.
Select column1,
(select max(date) from table1) as column2,
from table1
This offers a replacement to max{date} LOD bracket thingy. Which is one of the slowest LOD calcs in the application, due to the nature of the sql - it's rad, but very slow. Ergo, above calc replaces that completely.
If it's in excel, utilize native functions in Tableau or in your excel workbook.
Here's a copy and paste from functions page. This will help you with opening your workbook and pushing your filters around to fit your need. I always recommend building it internally, then build the JOB in your data source to only offer you the right data when you need it. (otherwise you're just pulling tons and tons of data, which will slow down the user experience)
MONTH(date)
Returns the month of the given date as an integer.
Example
MONTH(#2004-04-15#) = 4
NOW( )
Returns the current date and time.
The return varies depending on the nature of the connection:
- For a live, unpublished connection, NOW returns the data source server time.
- For a live, published connection, NOW returns the data source server time.
- For an unpublished extract, NOW returns the local system time.
- For a published extract, NOW returns the local time of the Tableau Server Data Engine. When there are multiple worker machines indifferent time zones, this can produce inconsistent results.
Example
NOW( ) = 2004-04-15 1:08:21 PM
TODAY( )
Returns the current date.
Example
TODAY( ) = 2004-04-15
YEAR (date)
Returns the year of the given date as an integer.
Example
YEAR(#2004-04-15#) = 2004
Functions are hard to memorize or get much out of the functions page indexed for Tableau. Enters my little dashboard - So use this dashboard instead. It will help you with the above functions in a user friendly format. Hope it helps, I used to use it daily.
Cheers,
Tyler
-
5. Re: Set filter on latest date when workbook open
Tushar More Nov 3, 2017 12:17 AM (in response to Vinay Nrandralal)Hey Vinay,
You can apply manual sorting. In the Dimension pane, right click the date field, Default Properties> Sort>Manual sort.