Use built-in functions to make data "Report Ready".

SailRCG
edited July 28, 2021 in Analytics #1
I recently had a case where I had to show 'weighted values' for various data measures. The issue was that the values were given as a continuous comma separated string of values and were not row-matched to the data measures.<br />
<br />
In other words, the data given was not report ready, and the way it was being delivered was not about to change anytime soon.<br />
<br />
The good news was that preceding each percentage of weighted value, was the data measure name. Using built-in functions, I was able to pull out the percentage value into a computed column. Using BIRT String functions and native Javascript functions, getting the parts of the string I needed and match them to data measures was easy.<br />
<br />
Have a look at the report example, to find the computed column with the example expression to do this. Additionally, I wanted to use a part of the computed column for a formula in one of the table columns. Again, using a Birt String function I was able to use a part of the string in my formula.<br />
<br />
**It is usually better to do as much as is possible from a data perspective, within the database and database server**