Last Modified Date: 05 Jan 2024
Environment
- Tableau Desktop
Answer
The following instructions can be reviewed in the workbook attached below.- Connect to data source.
- Click Custom SQL.
- Click ... to edit the custom SQL statement.
- Enter a statement similar to the statement below:
SELECT [Sheet1$].[Fruit Batch ID] AS [Fruit Batch ID], [Sheet1$].[Number of Bad Fruit_Bruised] AS [Value], "Bruised Fruit" AS [Reason] FROM [Sheet1$] UNION ALL SELECT [Sheet1$].[Fruit Batch ID] AS [Fruit Batch ID], [Sheet1$].[Number of Bad Fruit_Rotten] AS [Value], "Rotten Fruit" AS [Reason] FROM [Sheet1$] UNION ALL SELECT [Sheet1$].[Fruit Batch ID] AS [Fruit Batch ID], [Sheet1$].[Number of Bad Fruit_Too Big] AS [Value], "Too Big" AS [Reason] FROM [Sheet1$] UNION ALL SELECT [Sheet1$].[Fruit Batch ID] AS [Fruit Batch ID], [Sheet1$].[Number of Bad Fruit_Too Small] AS [Value], "Too Small" AS [Reason] FROM [Sheet1$]
- Click OK.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials