Monday, February 27, 2012

Concatenating Dimensions

Occasionally, we need to concatenate dimensions so that multiple answer questions don’t duplicate rows. A good example is using multiple segments on the same partner or store.



A Table Chart summing sales, using Name and Segment:


The partner has three segments, which will duplicate the row. Qlikview is smart enough not to triple the total, but exporting to Excel for further manipulation could create unexpected (wrong) results. Depending on your needs, it may be better to show the segments as a comma separated list. (One row vs. three rows)


Luckily, it’s pretty easy; Start by creating a Calculated Dimension:






Create the following formula in the expression editor:



Don’t forget to rename the calculated dimension, in this case ‘Segment’.

Marvel at your results!


No comments:

Post a Comment