• There are the following categories of In-Built Functions in Tableau:-

(A) Number Type In-built Functions in Tableau

    • Number type in-built functions in Tableau are used to perform calculations or manipulations on numeric data within our visualizations or calculated fields.
    • These functions can be applied to measure values or to create new calculated fields.
    • These functions can be used directly within calculated fields or as part of calculations in Tableau visualizations to perform various types of analysis and data manipulation on numeric data.
    • Some commonly used number functions in Tableau are as follows:-
      1. SUM():
        • Calculates the sum of a set of values.
        • Example: SUM(Sales)
      1. AVG():
        • Calculates the average of a set of values.
        • Example: AVG(Profit)
        1. MIN():
          • Returns the minimum value from a set of values.
          • Example: MIN(Sales)
          1. MAX():
            • Returns the maximum value from a set of values.
            • Example: MAX(Profit)
            1. MEDIAN():
              • Returns the median value from a set of values.
              • Example: MEDIAN(Sales)
            1. STDDEV() or STDEV():
              • Returns the standard deviation of a set of values.
              • Example: STDEV(Profit)
            1. VAR() or VARIANCE():
              • Returns the variance of a set of values.
              • Example: VAR(Sales)
            1. COUNT():
              • Returns the number of non-null values in a set of values.
              • Example: COUNT(Region)
            1. COUNTD():
              • Returns the number of unique values in a set of values.
              • Example: COUNTD(CustomerID)
            1. PERCENTILE():
              • Returns the value at a specified percentile of a set of values.
              • Example: PERCENTILE(Sales, 0.75)
            1. QUARTILE():
              • Returns the value at a specified quartile of a set of values.
              • Example: QUARTILE(Profit, 3)
            1. RANK():
              • Assigns a rank to each value in a set, with ties given the same rank.
              • Example: RANK(Sales)
            1. NTILE():
              • Divides a set of values into a specified number of tiles and assigns a tile number to each value.
              • Example: NTILE(4)
            1. Zn():
              • Returns the value if it’s a number; otherwise, returns zero.
              • Example: Zn(Profit)
            1. ABS():
              • Returns the absolute value of a number.
              • Example: ABS(Discount)
            1. ROUND():
              • Rounds a number to the specified number of decimal places.
              • Example: ROUND(Sales, 2)
            1. TRUNC():
              • Truncates a number to the specified number of decimal places.
              • Example: TRUNC(Cost, 2)

        (B) String Type In-built Functions in Tableau

          • String type in-built functions in Tableau are used to manipulate and perform operations on string values within the visualizations or calculated fields.
          • These functions can be applied to dimensions or measure values that are represented as strings.
          • These functions can be used directly within calculated fields or as part of calculations in Tableau visualizations to manipulate and analyze string data in various ways.
          • Some commonly used string functions in Tableau are as follows:-
            1. LEN():
              • Returns the length of a string.
              • Example: LEN(Product Name)
            1. LEFT():
              • Returns the specified number of characters from the beginning of a string.
              • Example: LEFT(Customer Name, 3)
            1. RIGHT():
              • Returns the specified number of characters from the end of a string.
              • Example: RIGHT(Postal Code, 5)
            2. MID() or SUBSTRING():
              • Returns a substring from within a string, starting at a specified position and optionally with a specified length.
              • Example: MID(Order ID, 4, 3)
            3. UPPER():
              • Converts all characters in a string to uppercase.
              • Example: UPPER(Product Category)
            1. LOWER():
              • Converts all characters in a string to lowercase.
              • Example: LOWER(Country)
            1. PROPER():
              • Capitalize the first letter of each word in a string.
              • Example: PROPER(Product Name)
            2. TRIM():
              • Removes leading and trailing spaces from a string.
              • Example: TRIM(Customer Name)
            3. REPLACE():
              • Replaces occurrences of a specified substring within a string with another substring.
              • Example: REPLACE(Description, “old”, “new”)
            1. FIND():
              • Returns the starting position of a specified substring within a string.
              • Example: FIND(“needle”, Haystack)
            1. CONTAINS():
              • Checks whether a string contains a specified substring, returning true or false.
              • Example: CONTAINS(Product Name, “Table”)
              1. CONCAT():
                • Concatenates two or more strings together.
                • Example: CONCAT(First Name, ” “, Last Name)
              1. STR() or STR():
                • Converts a number to a string.
                • Example: STR(Sales)
              1. SPLIT():
                • Splits a string into an array of substrings based on a specified delimiter.
                • Example: SPLIT(Address, “,”)
              1. LEFTPAD() and RIGHTPAD():
                • Pads a string with specified characters on the left or right side to reach a specified length.
                • Example: LEFTPAD(Customer ID, 8, “0”)

          Loading


          0 Comments

          Leave a Reply

          Your email address will not be published. Required fields are marked *

          This site uses Akismet to reduce spam. Learn how your comment data is processed.