Tableau Draw Financial Data Series - tableau-api

I am new to tableau. I am just trying the simplest task: I want to draw a stock price time trend. I have data and I have price. But no matter how I tried, tableau seems no option for this raw data drawing-- you have to select a measure, whether sum or average or count but no option for just raw data. Can someone tell me how to do this? Thx!

Sum should be fine and as you add dimensions the granularity will be determined. For example, Take one of your stocks and add the date to columns and the symbol to rows. Most likely you want to see daily close price so right click and change to exact date. At this point the sum shouldn't matter because you should only have one price for each day in your record. If you have hourly price data, I would suggest using close price or change the date to the hour level.

In the Analysis menu uncheck aggregate measures, then no aggregations are performed on the measures and you see all the values.

Related

Tableau Summing up aggregated data with FIXED

Data granularity is per customer, per invoice date, per product type.
Generally the idea is simple:
We have a moving average calculation of the volume per week. MA based on last 12 weeks (MA Volume):
window_sum(sum([Volume]),-11,0)/window_count(count([Volume]), -11,0)
We need to see the deviation of the current week vs the MA for that week (Vol DIFF):
SUM([Volume])-[MA Calc]
We need to sum up the deviations for a fixed period of time (Year/Month)
Basically this should show us whether on average, for a given period of time, we deviate positively or negatively vs the base.
enter image description here
Unfortunately I get errors like:
"Argument to SUM (an aggregate function) is already an aggregation, and cannot be further aggregated."
Or
"Level of detail expressions cannot contain table calculations or the ATTR function"
Any ideas how I can go around this one?
Managed to solve this one. Needed to add months to the view and then just WINDOW_SUM(Vol_DIFF).
Simple as that!

Showing values for overall dataset as well as subset

I have a dataset that contains various wait-time metrics for all appointments in a practice for a year (check-in to call-back, call-back to check-out, etc). It contains appt time (one of about 40 15 minute slots), provider, various wait times.
I can get Tableau to show me, for each 15 minute slot, the average wait times for each provider in the practice.
What I can't seem to be able to do is also display the overall average for the practice for that given time slot so as to be able to compare that provider vs. the "office standard".
I'm super new to trying out Tableau, so I am sure it is something very simple.
Thanks in advance.
Use a level-of-detail (LOD) calculated field. An LOD calculation occurs at whatever aggregation level you specify, rather than what's on the row or column shelf.
You didn't provide any info about your data set so I will use made up names here.
This gives you the overall average wait time, regardless of other dimensions on row/column shelves:
{FIXED : avg([wait time])}
This gives you the overall average wait time per provider, regardless of other dimensions on row/column shelves:
{FIXED [Provider Name] : avg([wait time])}
See the online Tableau help at https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_overview.html for more information. If you have filtering and need to calculate the overall without filters applied, look at the INCLUDE LOD keyword.

Aggregating data from the US stock market in Tableau, using different time frames

I am a very basic user of tableau and I have not found an answer to my question.
I have a txt file that has historical daily data for 98% of all the stocks in the US, with their daily capitalization. Each stocks has its TICKER, Daily Market Value for every trading day of the year, and its SECTOR.
I did a simple time series that display SUM([Mktval]) (sum of all individual market values) across all stocks, on a daily daily, and where I can see that the total value as of 2016 is about 24 Trillion USD, as in the image below.
When I change the view column from DAY to YEAR, I don't see the right values, but something a lot larger. So I realized that I need to do SUM([Mktval])/252 to get the right value for a year (there are 252 trading days in a year).
If I change the view to MONTH, as in the chart below, the numbers are again wrong because 252 is not the right value to use in the division.
Is there any way that Tableau can adjust the values automatically to reflect the AVG MktVal across different time intervals?
Thanks
Replace SUM(Mktval) on the Rows shelf with the following calculated field
avg({ fixed day(Date1) : sum(Mktval) })
That solution is all in one step. It is perhaps a bit more clear to use 2 steps. First, create a calculated field called total_daily_market_value defined as
{ fixed day(Date1) : sum(Mktval) }
Then make sure that calculated field is a measure. It is an LOD calculation that you can think of as a separate table with one value for each day showing the total market value for that day.
Drag that measure to a shelf, and then change the aggregation function to AVG(), MEDIAN(), MIN(), MAX() or STDEV() as desired. Tableau will aggregate the total_daily_market_value using your chosen aggregation function for whatever values of Date1 are in your view.

How can I get aggregated measures with continuous dates?

I would like to display the total amount (as text) of a measure filtered by a continuous date filter (slider). I doesn't sound difficult but when I try this it looks like the result is not aggregated and the amount for each single day is displayed on top of the others, and it's obviously not what I want.
So how can I get Tableau to summarize the result as one summed value when I use continuous dates?
Any help would be greatly appreciated!
Thanks.

Date calculation - Tableau

We have data that is submitted that is only YTD numbers. I'm wondering how I could display numbers that are subtracted along the Date field.
Ie, if I want to show the MTD movement on March. I will have to go March less February.
Now I know I can do this for individual measure fields. But having around 40+ measures seems a bit tedious.
http://kb.tableausoftware.com/articles/knowledgebase/creating-ytd-mtd-calculations
I tried to enter "Measure Values" but that is not a valid measure to put in the calculation.
Is there a way to set up a custom dimension?
Thanks,
Gem
After days of research, can't be done in tableau unless you want to labour for a week creating an almost cell by cell calculation. Data transformation in SQL will be a more feasible solution.
I had pivoted the data previously in SQL, so that I end up with 1 measure column instead of 40+. That enables you to minimise the calculation fields, so that you don't have to repeat all the calculation for individual measures.
Works well. Not for ratios though, as you will need to extract individual measures again so that you can divide them against each other. It's got pros and cons. Number of rows in the DB also multiplies.
Other solutions that preserves the table structure will be to use temp tables and do calculations on several temp tables.