-
1. Re: How to add one column of data to already existing source file
Ken Flerlage Jul 3, 2018 2:57 PM (in response to Alex Martino)Can you please provide a bit more detail on this?
-
2. Re: How to add one column of data to already existing source file
Alex Martino Jul 4, 2018 1:29 AM (in response to Alex Martino)I don't really know how to add more detail than that. Let's say I have the superstore data running through tableau and it has 100 columns. How can I add a column somehow using tableau's features (as opposed to SQL or excel) to add another column to the data set, and have one row be null and all the rest have the text "END"?
-
3. Re: How to add one column of data to already existing source file
Ken Flerlage Jul 4, 2018 7:46 AM (in response to Alex Martino)So, if you have say 1000 rows in your data, you just want one of those rows to have a NULL in this column and the rest to say "END"? If so, a calculated field should allow you to do that. Create the following calculated field:
// We'll assign NULL to the first order ID.
IF [Order ID] = {FIXED : MIN([Order ID])} THEN
NULL
ELSE
"END"
ENDSe
See attached workbook.
If this helps to resolve your question, please mark the answer as the "correct answer". This will help others who may have similar questions in the future. Thanks!
-
NULL or END.twbx 2.4 MB
-
-
4. Re: How to add one column of data to already existing source file
Alex Martino Jul 9, 2018 10:43 PM (in response to Alex Martino)THanks. Why do you have to use "fixed" here?
-
5. Re: How to add one column of data to already existing source file
Ken Flerlage Jul 10, 2018 4:57 AM (in response to Alex Martino)This is an LOD calculation. It allows you to step outside of the current level of detail. If you just use Min, that would only apply to the current level of detail. In the case above where we are showing each order ID, that min would only apply to that order ID. For more details see https://interworks.com/blog/rcurtis/2016/03/24/tableau-deep-dive-lod-fixed-calculation/
Did that calculation solve your problem?
-
6. Re: How to add one column of data to already existing source file
Ken Flerlage Jul 21, 2018 11:44 AM (in response to Alex Martino)Hi, just following up on this to see if we've addressed your question or you have additional questions. Please advise.
-
7. Re: How to add one column of data to already existing source file
Alex Martino Jul 24, 2018 5:05 PM (in response to Alex Martino)It did!! Thanks.