tableau, excel workbook, three worksheets, want data sources column in union - tableau-api

I have a question on Tableau Desktop. I have an excel file with three tabs: Applications, Shared Drives, Sharepoint_Libraries. I would like to union all of these tables. I would like a column called Data Source with the below values. So from Applications excel file, I would like a Data Source column in the Union which says Applications. So from Shared Drives excel file, I would like a Data Source column in the Union which says Shared Drives. Lastly, from Sharepoint_Libraries excel file, I would like a Data Source column in the Union which says Sharepoint_Libraries. How can I do this in Tableau? Do I need to edit the source excel files and add the Data Source column in each file? Or, can I create a calculated field called Data Source and use a formula to populate this information?
Data Source
Applications
Shared Drives
Sharepoint_Libraries

Tableau has a "merged mismatched fields" option for this situation.
So..
open Desktop
connect to the Excel file
drag over the Applications sheet
drag over the Shared Drives sheet and position it just below Applications until you see the "union" box appear then release your mouse button
repeat for Sharepoint Libraries
in the preview window (below) you will see the three different fields.
highlight the three fields that you want to merge
right-click and choose Merge Mismatched Fields.
Then you can rename the field accordingly :)

Related

Crystal Reports: how do i export a table to excel data and insert line breaks without getting everything on one horizontal line?

i'm new to CR. i have a report basically consisting of 2 tables of data(data comes from several subreports, not crosstab) and whenever i export to excel data it all comes out under 1 line, the entire report.
i've tried adding adding Chr(10)/Chr(13)/Chrw(10)/Chrw(13) at the beginning of each line, together with the data as well as a separated formula but only get an empty cell, instead of a new line.
if i separate the data in different sections, i'd lose the "table" look as i cannot extend lines&boxes over the section length.
i'm out of ideas at this point. anybody?
Option 1: get the data into a single data set. For example, use a Command/View/SP with a UNION ALL in the SQL.
Option 2: at least one of the 3rd-party Crystal Reports tools listed here allows you to automate the process of exporting one report to Excel and append the Excel export of a 2nd report to the same Excel workbook and worksheet.

Keep leading zeros when joining data sources in tableau

I am trying to create a data source in Tableau (10.0) where I am joining a table from SQL with an Excel file. The join happens on a site id but when reading the id from the excel source, Tableau strips the leading zeros (and SQL keeps leading zeros). I see this example
to add the leading zeros back as a new, calculated field. But the join is still dropping rows because the id is not properly formatted when making the join.
How do I get the excel data source to read the column with the leading zeros so I can do the join?
Launch Excel and choose to open a new blank workbook.
Click the Data tab and select From Text.
Browse to the saved CSV file and select Import.
Ensure that Delimited is selected and click Next.
Leave Tab as the delimiter and click Next.
Select the column containing the data with leading zeros and click
Text.
Repeat for each column which contains leading zeros.
Click Finish.
Click OK.
Never heard of or used tableau, but it sounds as though something (jet/ace database driver being used to read excel file?) is determining the column to be numeric and parsing the data as numbers, losing leading zeroes
If your attempts at putting them back are giving you grief, I'd recommend trying the other direction instead; get sqlserver to convert its strings to numbers. Number matching should be more reliable than String matching, so long as the two systems don't handle rounding differently :)
If your Excel file was read in from a CSV and the Site ID is showing "Number Stored as Text", I think you can solve your problem by telling Tableau on the Data Source entry that the field is actually a string. On the preview data source view, change the "#" (designating number) to string so that both the SQL source and the Excel source are both strings before doing the join.
This typically has to do with the way Excel stores values as mentioned above. I would play around with the number formatting for the Site ID column in Excel itself, not Tableau, and changed that two "Text" in Excel. You can verify if Tableau will read it properly with the leading 0s by exporting your excel file to csv and looking in the csv files to see if the leading 0s are still there.

How to Load multiple excel sheets data to the same table in SSIS?

I am bit confused on my business scenario and need your's valuable suggestion to go ahead .
I got one excel work book template from the client and it is having 8 sheets and 250 columns and each sheet having different columns and there is no relationship from one sheet to other sheet in terms of column names (one sheet has 60 columns with 5000 rows and other sheet has 10 columns with 200 rows ) as well as data also .
I Need to load this data into single table using SSIS ?
Our client confirmed there will not be change in their inputs ?
Here are steps for ur scenario
1- create a table which has all the columns in excel sheets. If column names are repeating on multiple sheets. You will have one time in your table.
1- bring data flow task. Bring excel source. Make connection to ur excel. Choose sheet1 and then bring oledb destination and map input columns to table. If the column names in table will b same in ur sheet. They will map automatically.
2- bring second data flow. Bring excel souce. Use existing excel source n choose sheet2. Get oledb dest n map to ur destination table.
Get third data flow n load third sheet. Repeat for ur all sheets.

How to combine multiple excel data into one excel with all sheets?

Actually I have a list of customers from all the countries in one sheet name "ALL".
Problem: I have to crate separate sheets for group of countries like for USA sheet name will be USA and for Australia,Germany and Switzerland sheet name will be Central_Region output will be like below image.
What I have tried till now :- I used tFilterRow component and I have got all the separate excel files group by countries . now trying to combine in one file.
For Example : I have 5 excel workbook files each has one sheet like excel1.xls has sheet "USA" other excel2.xls has sheet "Canada" and same other 3 are in same way.
Now I want to generate a single excel workbook which will have all the sheets like "USA", "Canada" and all other sheets from other excels.
I tried using iUnite but it did not help it just append all the sheets data into one sheet.Like below image
Download this add-ins
Open one your excel file and then open this add-ins file (also you can install that)
when you open this file, select Enable Macro.
Go to DATA tab on excel file and select RDB Merge add-in.
set properties and push Merge Button.
With this, your excel fills will merge in one sheet.
If you can't know in which order row will appear, you could store your data in csv files for each country.
Then you can add each csv file into a separate sheet on the Excel file using Write after.
If rows are coming in the rigth order, like all USA then Canada etc . . . you can directly use Write after in your ExcelOutput behind your tFilter but i highly suppose this is not the case.
If you have same structure excel file with different in sheet name then you have to make job like this.
tFileList---tFileInputExcel-----tMap---tFileOuputExcel
Set source directory where you get all the files to the tFileList component.
Use global varibale which hold "file with path" information and assign to the file name text box of tFileInputExcel component.
In select Sheet box assign index instead sheet name.
check Append property of tFileOuputExcel component you can merge all files in single one.
Note: in tMap you can add transformation or make changes in column sequence of output.

Tableau Workbooks Error

I have 3 Tableau workbooks and 1 work book is a fact table and rest two are tables related to the previous one I need to fetch them into one workbook and make charts using all three tables data. I am unable to fetch all three workbooks into single workbook to work with all 3 of them.
I have .tab files with one fact table and 2 dimension tables in .tab files and I need to use all three files and make charts using that data
Based on the Tableau Desktop documentation, you could
Copy and paste selected sheets to another workbook.
Import a saved workbook into your current workbook.
Export selected sheets to a new workbook.
If you've got an older version of Tableau, such as 8.0, then try using bookmarks