Wednesday, June 26, 2013

Concatenate Two Attribute Forms


You can create a new derived metric from an existing metric in the grid. And you can use many of the available function in the derived metric editor. Ist is possible to concatenate two attribute forms using derived metric.  Derived metrics will by default show only the metrics available in the grid.

For example. I have a rerport with the below attributes.



However I need to display the combination of  two attributes forms as below.ie. ID of category and DESC of subcategory.




You can use concat function to join multiple strings. So you need to convert the attribute form into derived metric and then use the concat function. How do we do this ? You can use MAX function to convert the atribute form into a derived metric, so that concat function can recognise the string.  So inset a new metric with the below formulae.

Concat(Max(Category){~}," . ",Max(Subcategory@DESC){~})

This is concatenating the ID form from category with a space dot and decriton form from subcategory.

Now, in my report I am showing all these three columns, ie category, subcategory and categotyID . SubcategoryDESC. How do I display only the concatenated attribute? If I remove the other two attributes from the grid, the derived metric will be empty. Do you have any suggestions other than modifying the width of the the attributes ? Please do let me know.


No comments:

Post a Comment