How to hide key field in Tableau? - tableau-api

I'm using 2 data sources connected by 'product' field: one source contains category information, other - net sales data. Result is shown attached:
Example is shown in Excel but it's the same in Tableau.
The problem is that I don't need Product column and I just want to see a pivot table like in attached picture.
Is it possible in Tableau?

Recreate the subcategory so you can join on that. On your data source that has both, place product on rows then place subcategory. Copy that crosstab to excel. Use this WHEN THEN Builder found here: https://dl.dropboxusercontent.com/u/60455118/WHEN%20THEN%20builder.xlsx to quickly make the components of a CASE statement formula. Then join the data sources on subcategory. .

Related

Arrivals based on database

I am trying to retrieve arrival rates from a excel spreadsheet in my model but I don't have the option to select the specific row and column i want. How can I ensure that a specific cell is chosen? (For example i want the value 5 corresponding to "limeConveyor" row and "red" column.
This is the sample spreadsheet
This is the properties window
Thank you in advance for your help! :)
Edit 1:
I am currently unable to select "red" from the
dropdown list of value column. Is my program bugged or something?
Maybe to clarify Felipe's reply: I suspect your dbase table is not setup correctly and doesn't match your xls screenshot.
First, load your spreadsheet into an AnyLogic dbase table using the wizard. It should then look like this (note the column properties: the column type is important):
Now in your source, you can easily load the required column-row combination and the valuer-dropdown allows you to select "red" if you want:
You can find the example model that I used for the screens here, hope this helps.

side by side chart for dimensions only in Tableau public 10

Hi I have data like this:
Sample Data
I want a chart like this:
Desired Output
Is it possible in Tableau or not? Please help.
First of all you have to pivot the dataset columns.
To do so, in the datasource section go select the 3 columns, right click and select pivot.
You'll get 2 new fields: Pivot Field Names and Pivot Field Values.
Drag the Pivot Field Values in the dimension panel.
From the analysis Menu uncheck Aggreate measures.
Finally you shold be able to get something like this:

How to merge two data sets in Tableau via relationship?

I'd like to create a combination bar/line chart and combine two data sets. I'd like the columns to be months and the rows to be the aggregate values within those months. However, I'd like one of the data sets to display as a bar chart and the other data set to display as a line chart. It should look like this:
I have the following data sets:
data_set1 = [{'value':10,'date':2016-01-01},{'value':15,'date':2016-01-02},{'value':5,'date':2016-01-03},{'value':10,'date':2016-01-04},{'value':120,'date':2016-02-01}]
data_set2 = [{'value':100,'date':2016-01-01},{'value':200,'date':2016-02-01}]
I've been able to create the bar chart (see below):
However when I try to add the values from the second data set by also adding it to the columns section, I get the following error:
"In order to use fields from dataset 2, a relationship needs to be created with dataset 1. Select Data > Edit Relationships to open the Relationships dialog box."
I tried to create a relationship between these two data sets by the following process:
Set the Primary Data Source as data_set2, since that is the smaller dataset.
Selected Custom to create a custom relationship
Selected Add and set both the 'Primary Data Source Field' and the 'Secondary Data Source Field' as Date
However,
When defining the relationship between two date type fields, try selecting the level of aggregation for the date fields, such as Month(Close_Date) in source 1 maps to Month(Date) in source 2. In effect, every value in those fields is first truncated to the beginning of the period (month in this case) before comparisons are made.

SSRS Report Group

I want to get a tabular result like below
My query is returning the result like below
Can anyone suggest me a way to do this using SSRS?
I have tried grouping, but couldn't get the expected output. I am new to ssrs reporting. Please provide a detailed solution for this
Set up a Tablix, grouped by Doctor Code, and add a Group Header row based on this group. Display all fields in this row except Product Sampled.
In the Product Sampled Textbox, insert a Tablix directly into the Textbox. Set this Tablix up to show only one detail row, set to display Product Sampled.
What this achieves is that you have one row per Doctor Code, but within each of these group rows you will have a table embedded to display each of the Product Sampled rows. Because the Product Sampled Tablix is embedded in a Group scope, it will display the Product Sampled details for each Doctor Code as required.
Edit after comment:
I will demonstrate with a simplified example. First generate some sample data:
Next, set up a table with a group based on DoctorCode, which will look something like this:
Note we haven't filled in ProductSampled yet.
Next, go to Toolbox and drag a table object into the blank ProductSampled cell. Remove the header and all but one of the columns, then set the column in the table to the ProductSampled field. It should look something like this:
When you run this report with the sample data, it works as required:

Is it possible to create a filter that filters out distinct values in a dataset?

I'm trying to create a report that will contain two pie charts. I get the data for the report from SQL.
Currently, I created a dataset for the first chart which holds records with the following fields: Import ID, Date, Status. This dataset contains duplicate records.
For the second chart, I need the same data I have in the first dataset, only without duplications and aggregated differently.
I realize that I can create another dataset that will get the distinct values from the SQL database, but I was wondering if there was a way to use the built-in filtering functionality to filter out the dataset I already have to return only distinct values (based on ID field).
Looking at the options in the following filtering dialog, I see no obvious way to do this:
If ID is not unique and your 1st query looks like this:
select ImportID, Date, Status
from YourTableSource
WHERE YourConditions
Then you probably should use for your 2nd query form like this:
select DISTINCT ImportID, Status
from YourTableSource
WHERE YourConditions
If changing the query is not an option ,then you may create the Group in ssrs with invisible DETAIL pane and place the ID and Status fiels in int Group pane