Last Modified Date: 27 Jan 2022
Environment
Tableau DesktopResolution
There are 2 possible workarounds:Option 1
Using a pivot calculation as follows:1. Create a file with a list of all the column name you want to pivot.
2. Cross database join the file to Salesforce data using relation "1 = 1".
3. Rename the filed from file as "Pivot Field Names".
4. Create the following calculation fields:
Field Name: "Pivot Field Values".
Calculation:
====
====
Calculation:
====
CASE [Pivot Field Names] WHEN "Column Name1" THEN [Column Name1] WHEN "Column Name2" THEN [Column Name2] WHEN "Column Name3" THEN [Column Name3] ...END
====
Option 2
The closest workaround available would be to perform all desired aggregations/edits on the Salesforce data before bringing any data into Tableau.
Cause
Per our documentation here: Pivot Data from Columns to Rows,"Sometimes, analyzing data that is stored in a crosstab format can be difficult in Tableau. When working with Microsoft Excel, text file, Google Sheets, and .pdf data sources, you can use the "Pivot your data from crosstab" format into columnar format. If you are working with other data sources, you can Pivot using custom SQL (Tableau Desktop)."
The problem is that Salesforce.com falls into "other data sources" and thus requires use of Custom SQL. And the problem with that is that custom SQL for Salesforce data (SOQL query) does not support alias for column names.
Additional Information
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