Alpha Numeric Filter
Last updated
Last updated
The Alpha-Numeric Filter feature enables users to include and filter data containing both letters and numbers. This provides a flexible way to refine data selections based on alpha-numeric fields.
To enable alpha -numeric filter add an alpha-numeric field to the Category Field.
If an alpha-numeric field is the only category added, the filter appears as a slider in the visual.
If combined with other categories, it displays as a dropdown list in the Facet Filter View.
To enable or disable the alpha-numeric filter slider, navigate to the Format Pane, in the Alpha-Numeric Filter section use the toggle option to switch the slider view on or off.
Configure General section under alpha numeric filter settings with the following options:
Range:
Between: Filter data within a specified range.
Less than or equal to: Include values below or equal to the selected value.
More than or equal to: Include values above or equal to the selected value.
Step: Use the Step option to set increments size for the slider that make sense for your data.
Label: Use the toggle button to enable or disable the visibility of the Alpha numeric category label in the visual.
Category Label: Enable this option to display the selected range of alphanumeric IDs in the header.
Configure Slider Style section under alpha numeric filter settings with the following options:
Fixed Label: When enabled, displays a fixed label for typing the start and end range.
Slider Color: Choose the color of the selected range in slider.
Border Color: Select the color for the unselected portion of the slider range.
Background Color: Adjust the background color behind the slider.
Drag Handle Color: Select the color of the slider handle used to adjust values.
Font Color and Font Style Settings: Modify the font color and style to Italics, Bold and Underline
Font Size: Customize the font size of values shown in the alpha numeric filter.
At the bottom left of the tile, you’ll find the Reset to Default option. Click this to revert all Alpha Numeric Filter settings to their original configuration.
For users who need to handle complex alpha-numeric patterns and extract specific sets of numbers, a custom regex can be defined. This is useful when dealing with structured alpha-numeric formats where only certain numbers should be considered.
Navigate to the Display Settings option in the format pane
Locate the Alpha Numeric Regex text box
Enter the custom regex pattern
Here, we explore alphanumeric patterns with examples:
\d
By default, the \d
token is used in regular expressions to extract all numbers from alphanumeric data. The \d
operation captures individual digits that are not in a continuous sequence. This means that numbers appearing as isolated or broken segments, rather than as part of a long continuous sequence, will be extracted separately.
To extract the first two numbers from an alphanumeric string using regular expressions, you can use the following pattern:
This pattern matches the first two digits at the beginning of the string:
^
asserts the position at the start of the string.
\d
matches any digit (0-9).
{2}
specifies exactly two occurrences of the preceding digit.
To extract the last digit from an alphanumeric string using regular expressions, use the following pattern:
\d
matches any digit (0-9).
$
asserts the position at the end of the string.
To extract the last two digits from an alphanumeric string, use the following pattern:
\d{2}
matches exactly two digits.
$
asserts the position at the end of the string.
To extract the two middle numbers from an alphanumeric string, such as "34AWE27S4D7"
, you can use the following regex pattern (assuming a fixed-length string):
Explanation:
^
asserts the position at the start of the string.
.{6}
matches any 6 characters from the beginning.
(?<=...)
is a positive lookbehind that ensures the match is preceded by exactly 6 characters.
\d{2}
captures exactly two digits after the first 5 characters.
Note: In the provided string
"34AWE27S4D7"
, the two middle numbers are27
, which appear at the 6th and 7th positions.
\d