Setup your excel sheet with an index / row number column with one line per day/quote.
Create a calculated item in Tableau to calculate the day number in the year: datepart('dayofyear',Now())
Create a new sheet in Tableau with a filter which has a condition like DayIndex = [CurrentDayInYear] (where dayindex is the name of your index /row number column in Excel) and [CurrentDayInYear] is the calculated field you created.
The rest is display preference; personally I would move the quote into the title. then have nothing in the body.
In my example I added the sheet to the dashboard as floating and resized it.
DailyQuote.twbx 10.8 KB
Thank you. I can get this to work until I apply the modulus operator. I get the calculation error "The field [Quote Number] is invalid" inside the filter calculation. I need to use the modulus operator to "rollover" the quotes because I may not have 365 quotes.
Here are my formulas:
[Total Number of Records]
TOTAL(COUNT([Number of Records]))
[Day Number]%[Total Number of Records]
My filter (by Index from excel):
The problem isn't the modulus operator, it's that you're filter is effectively combining aggregate (the Total Number of Records formula) with non aggregate (Index).
I see. I guess can manually code in the number and just change it when new quotes are added. But out of curiosity, is there a way to get the total number of records in a non-aggregate form?
Try the following for the filter formula (you can split this up into calculated fields if you want):
IF datepart('dayofyear',Now())%int(MAX(DayIndex)) = 0 THEN 1
I used the if statement because if you reach the max record the mod formula will return 0.
Thought this was working, but I'm getting multiple quotes when substituting different days for NOW() ex: DATE("6/12/14")
Attach a packaged workbook please.
If you want to really randomize it, consider doing a DATEPART to pull the 'second' (range 0-60) or 'minute' (range 0-59) value from NOW(). Then do a COUNT of the number of records in your table. Then do some percentage calculation of the 'minute' value you pulled, relative to 59, (rounded to an integer value) and do a LOOKUP to get the record from your table that is that far down the list. That way you'll get different messages throughout the day. And you'll never have to recalc anything as you add new messages to the file.