We have created a dashboard and we would like to split a long string value with multiple values into separate columns in DX Dashboards.
How can this be achieved?
Environment
DX O2 SaaS
DX O2 24.* On-premise
DX APM 23.*, 24.1
DX AXA 23.*, 24.1
DX OI 23.*, 24.1
Resolution
By following the below steps, you can extract the required values and split them into separate columns
Build the Query: Construct the query to fetch all the required fields, including the column that contains the long string For this example, lets assume the column that contains the long string iss event.value And the comma-separated values are as indicated in the above screenshot, ie: CORR_ID, MFE_ID,...
Duplicate the Original Column by Using Transform Add Calculated Fields:
Go to the Transform tab.
Select Add field from calculation and choose Mode: Binary operation from the dropdown.
In the Operation section, set the field to event.value, choose the operator +, and enter any number (e.g., 0 or 1) as the next field, then click on Create.
Assign an alias to the field (e.g., CORR_ID). This will create a duplicate column named CORR_ID, with 0 or 1 appended to the end of the field values. (this is the workaround to duplicate a column)
Extract the Required Value Using Override Field Properties:
Go to the Overrides tab in the visualization settings area (right side).
Click Add override for and select Field with name. From the dropdown, choose the column name (e.g., CORR_ID).
Add an override property and select Regex from the dropdown.
Define a regex pattern to extract the desired value. For example, use:/CORR_ID=(.*)\; MFE_ID=.*/
This regex will extract the CORR_ID value from the string and display it in the field value.
For Additional Columns: Repeat steps 2 and 3, updating the alias name and regex as needed, as shown in the screenshot below: