Quantcast
Channel: SCN : Blog List - SAP BusinessObjects Web Intelligence
Viewing all articles
Browse latest Browse all 221

How to merge dimensions where values from one Query has leading or trailing spaces.

$
0
0

Hi All,

 

recently I came across a requirement to merge two Queries where the values of one of the merged dims had leading spaces.

Values from Query 1 dim was :

 

id            value   

"123"     1

"345"     2

"567"     3

 

and the values from Query 2 was

 

id               dim1

"   123"      a   

"345"         b

" 567"        c

 

Simply merging this dimensions will lead to the following values for the merged dim

 

merged id

"   123"

" 567"

"123"

"345"

"567".

 

How to get the merged values as

"123"

"345"

"567"

 

and use the other objects from the Queries like ?

 

merged id     val     dim_det

"123"           1           a

"345"           2           b

"567"           3           c

 

Steps :

 

1 - merge both queries on [id] onto [merged dim],

2 - create a dimension variable [final merged dim] = Trim([merged dim]),

3 - create a detail variable for [dim],  [dim det] = Trim([dim]) whit associated dimension = [final merged dim],

4 - use [final merged dim], [val] and [dim det] on your report.

 

Regards,

Rogerio


Viewing all articles
Browse latest Browse all 221

Trending Articles