Hello DOJO
I saw in this post: Dashboards - Is it possible to rename query columns? - DataMiner Dojo and in the [ID_34302] that GQI table column names will no longer include table names
I wonder if it exists a way to rename a column title like in SQL (SELECT colonne1 AS c1)
In this example, let's say the name could be "Total data"
Second question
Is it possible to truncate the content of a cell to keep just a part based on length or on pattern ?
Hi Joel,
You can achieve both actions using the column manipulation in your Query:
- Get a subset of a column value:
You select a column manipulation, and using a regex you can e.g. take only the first five characters:
- We can use the same trick to get a custom column name, however in the regex we just use .* (which means copy everything) and give the column a new name:
You can follow the column manipulation action with a select action in your query to only show the new columns.
thanks to you both
In the past we had already used this colomn manipullation (for the title), but we didn’t have understood why after this, it was impossible to color the field numerical based and we gave up this way
The truncate using regex works like a charm
Indeed, wrapping it using the column manipulations will change the type of the column to string. This will also impact the filtering capabilities and performance when filtering. Note that renaming columns in GQI is on our roadmap so that it’s available without the above drawbacks.
Hi Joel,
As additional note, if the column to be concatenated is a numeric type (like in your example), the new (renamed) column will be string type.