Tableau - Dynamic Datasets - tableau-desktop

I'm not sure what what best way would be to describe the problem I'm trying to solve.
Basically, my datasets are a model output which are generated in the same format on the daily basis.
I have build a dashboard around one dataset but want to create a dynamic filter which check for the output files in a folder and update visuals for the dataset I select.
I can create data connections for the existing datasets and that will make it work but since the datasets get updated on daily basis, is there a way to create such a filter?

I don't know how to let the user select any arbitrary data source without knowing the choices in advance. Maybe there is a way. But maybe you don't need to do that.
Suppose you generate new datasets each day and they are always called by the same names, such as data-monday, data-tuesday, data-wednesday, etc. So you always have exactly the same seven datasets to pick from.
Then each dataset could have a field in it corresponding to the name, such as "WHAT-SET" with values, say, "monday", "tuesday', "wednesday", etc.
Then your data step could import all seven data sets and UNION them together, and your user could use a parameter to filter on "WHAT-SET" to pick the desired one.

Related

How to use drop-down menus as filters including an "All" option?

I have a list with clients and data about their orders (date, amount ordered, price etc.)
It is named [m]/[year] e.g. 1/23 for January 2023.
I am trying to create a separate sheet with statistics that would give me a better overview of the data in the first sheet. I'd like to sort it by the period, category and location which you can select from a drop-down menu.
I have this piece of code that takes the sheet name from Period and uses the Category and Location filter keywords to sum the totals from all orders corresponding with the selected filters.
=SUMIFS(INDIRECT($A2&"!"&"F2:F");INDIRECT($A2&"!"&"C2:C");$B$2;INDIRECT($A2&"!"&"D2:D");$C$2)
This works perfectly. However, I would like to implement an "All" option for the filters too.
Summing up everything at the same time wouldn't be such a problem, but the filters can have any combination of "All" options selected which adds up to 8 possible combinations between the three filters.
My thought process is to create 8 different branches of SUMIFS nested in an IFS function.
Is there a simpler, more elegant way of doing filters in Google Sheets? I am not just looking for t
he solution, I need a pointer in the right direction so that I can read up on it and learn it.
Here's a generalized example with some sample data to deal with your expected case scenario:
=sumif(A:A,if(D2="All","<>All",D2),B:B)

Tableau has two data tables, how can i make a filter only apply to single data table

I currently have two data tables each linked to a date table. The data tables are from salesforce. I can calculate the number of a certain case type per quarter without issue. I can also calculate the running sum over quarters to show instrument install base increasing. I want to divide the number of cases per qtr by the install base. This calculation works, but when I apply a filter to see different types of cases per instrument, the filter impacts the install base as well. I would like to keep the install base consistent. I tried different LOD, but no luck. Any suggestions on filters and LOD and where to place in tableau would be beneficial.
One option is to use a parameter for filtering and then having a calculated field that changes based on parameter values in one table but not in the other table. However, this type of filter would affect all worksheets that use the same data.

Alteryx: Creating multiple Histograms from one dataset

I have a data set that contains the following information - Date, item # and the unit price for that item on that date.What I would like to create is one histogram per item (my dataset has 17 unique items), charting the frequency of the unit prices? Is this possible in Alteryx?
What you really want is the ability to group by items within your data set. I think the closest thing to this for your specific use case is the summarize tool. You can group by item and then use the percentile operation to generate several points within the data range to add to a histogram.

Multiple response crosstabs/frequencies based on categorical variable in SPSS

I've just started using SPSS after using R for about five years (I'm not happy about it, but you do what your boss tells you). I'm just trying to do a simple count based on a categorical variable.
I have a data set where I know a person's year of birth. I've recoded into a new variable so that I have their generation as a categorical variable, named Generation. I also have a question that allows for multiple responses. I want a frequency of how many times each response was collected.
I've created a multiple response variable (analyze>multiple response > Define variable sets). However, when I go to create crosstabs, the Generation variable isn't an option to select. I've tried googling, but the videos I have watched have the row variables as numeric.
Here is a google sheet that shows what I have and what I'm looking to achieve:
https://docs.google.com/spreadsheets/d/1oIMrhYv33ZQwPz3llX9mfxulsxsnZF9zaRf9Gh37tj8/edit#gid=0
Is it possible to do this?
First of all, to double check, when you say you go to crosstabs, is this Analyze > Multiple Response > Crosstabs (and not Analyze > Descriptive Statistics > Crosstabs)?
Second, with multiple response data, you are much better off working with Custom Tables. Start by defining the set with Analyze > Custom Tables > Multiple Response Sets. If you save your data file, those definitions are saved with it (unlike the Mult Response Procedure).
Then you can just use Custom Tables to tabulate mult response data pretty much as if it were a regular variable, but you have more choices about appropriate statistics, tests of significance etc. No need in the CTABLES code to explicitly list the set members.
Try CUSTOM TABLES, although this is an additional add-on modules that you need to have a licence for:
CTABLES /TABLE Generation[c] by (1_a+ 1_b + 1_c)[s][sum f8.0 'Count'].

Creating a data visualization site with Rails

I have a very large excel spreadsheet that consists of a user name, a location, a date, and some fields of numbers, for example.
User,location,date,value1,value2,value3
Steve,NYC,2012,9,1,3
Steve,NYC,2011,3,3,2
Steve,CA,2011,1,2,0
Michael,CA,2012,10,3,2
Michael,CA,2011,10,2,0
How would I go about organizing a rails site such that one can view all the values for a certain user?
For example,
/users/steve/all
would display all the values in descending order of date where user=steve.
/users/steve/nyc
would display all the values in descending order of date where user=steve and location=nyc.
I think I would need to create a users model and import all the data from the excel into the database, but I'm lost about how to do that.
The application, in essence, would be a simple data visualizer. Maybe I have to separate the database and create a user has_many :locations and locations :belongs_to user, I'm not sure. I want the data to be viewed in all sorts of ways—maybe I want to display all the users from a certain location, or view all the locations of a certain user, etc...
I suggest setting up your model within your rails application first. Then, you can just write a rake task probably similar to this question or you can build it from scratch. There's also a railscast.
If you need to directly import from Excel (e.g. the excel sheets are uploade by a user). You can use one of the following gems to importing data from an Excel Sheet
roo Reads new and old excel format (+others)
spreadsheet Reads and writes old exel format
If you only have this one excel sheet it will be far easier to simply export the data to csv and follow the answers given in the stackoverflow question mentioned above.
As for the second part of your question on how to model your database you already had the right idea.
Easiest is to fully model what your domain looks like and transform the data accordingly.

Resources