Monday, June 19, 2023

Explain the String Function ' LOWER ' in Tableau with Example?

 In Tableau, the "LOWER" function is used to convert a string to lowercase. It returns a new string where all the characters of the original string are converted to lowercase.


The syntax for the LOWER function in Tableau is as follows:


LOWER(string)

Here, "string" is the original string that you want to convert to lowercase.


Let's consider an example to understand the usage of the LOWER function:


Suppose we have a dataset of customer names, and we want to convert all the names to lowercase for consistency. We can use the LOWER function to achieve this.


  • Create a calculated field by right-clicking on a blank area in the "Data" pane and selecting "Create Calculated Field."
  • In the calculation editor, enter the following formula:

            LOWER([Customer Name])

            Here, [Customer Name] is the field containing the customer names that you want to convert to                 lowercase.


  • Provide a name for the calculated field, such as "LowercaseName," and click on the "OK" button.
  • You can now use the "LowercaseName" field in your analysis. You can display it in a table, use it in other calculations, or apply filters.


The LOWER function will convert all the characters in each customer name to lowercase, providing consistent lowercase representations of the names.


For example, if the original customer name is "John Doe," the LOWER function will return "john doe" by converting all the characters to lowercase.


By using the LOWER function in Tableau, you can standardize the case of strings in your data, making it easier to perform comparisons, sorting, and other analysis tasks that require consistent casing.

No comments:

Post a Comment

If you have any doubts. Please let me know

How can you create an alias for a table in a SQL query?

In SQL, you can create an alias for a table in a query to give the table a temporary, alternative name that you can use in the query. Table ...