Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Web Intelligence
Viewing all articles
Browse latest Browse all 5402

Concatenate an entire column into a single cell

$
0
0

Hi Experts,

 

I have a requirement to concatenate multiple values into one cell and have them grouped by a primary dimension. I have seen a solution for BOXI 3.1 but when I try it in 4.1, I don't seem to get the same results. I was wondering if there was a new work around for this solution?

 

Here is a sample of how my data is structured...

 

 

Animal

Owners

DogsBob
CatsMatt
GoatsMike
ChickensJake
DogsRyan
CatsBrian
GoatsJeff
ChickensChristine
DogsAlex
GoatsOlaf
GoatsVictor
CatsVanessa
CatsLilly
CatsMackenzie
CatsJackie

 

 

Here is what I am trying to accomplish...

 

AnimalOwners
DogsBob, Ryan, Alex
CatsMatt, Brian, Vanessa, Lilly, Mackenzie, Jackie
GoatsMike, Victor, Olaf, Jeff
ChickensChristine

 

 

 


The solution I found that doesn't work in 4.1 is this...

 

·        Create a variable [VAR Max CATEGORY = Max([Category]) In ([Lines])to find the maximum CATEGORY with respect to each Line

·        Create a variable [VAR Concat CATEGORY = CATEGORY +", "+ Previous(Self), to concatenate the CATEGORY value with it's previous row value

·        Create a 3rd variable [VAR Max Concat CATEGORY = [VAR Concat CATEGORY Where ([Category]=[VAR Max Category]). This variable basically gives only those rows of [VAR Concat CATEGORY where the value of the CATEGORY is maximum for that particular Line

·        Create a variable[VAR CATEGORY =If(IsNull(Previous([VAR Max Concat Category]));Substr([VAR Max Concat Category];1;Length([VAR Max Concat Category])-2);Substr([VAR Max Concat Category];1;Pos([VAR Max Concat Category];Previous([VAR Max Concat Category]))-3))

Basically, the formula checks if the previous value of VAR Max Concat Category is NULL.

 

Source: http://f100smai.benxbrain.com/en/FALSE-How-do-I-concatenate-a-single-field-from-multiple-rows-in-BOXI-3.1-WebI--thread-1-3245018.htm

 

Thanks in advance!

 

Best,
Ryan


Viewing all articles
Browse latest Browse all 5402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>