Last Modified Date: 16 Jun 2022
Environment
- Tableau Cloud
Answer
Put the fields to the shelf then query the view data using REST API: Query View Data.The sort order of the query result is not the order in the shelf but alphabetically sorted within the shelf.
If you want to control the sort order of the query result data, for example, you need to rename the field and to number them.
Note that if the field is time series, the name will automatically contain "Seconds of" or something like that at the beginning of the field and this might get the sort order unexpectedly changed.
In order to avoid this (to get rid of "Seconds of" in the field name), you can use calculated field and STR function to change the time series data to string data like below.
- STR(<field of time series>)
Additional Information
Query View DataType conversion functions available in Tableau
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