cancel
Showing results for 
Search instead for 
Did you mean: 

Merging multiple fields

ulisesgarza
Discoverer
0 Kudos

Hi all,

I'm trying to merge two sets of keys from two different queries, so I can get my description field.

Query 1

key1

key2

Query 2

key1

key2

description

I merged Query1.key1 = Query2.key1 and Query1.key2 = Query2.key2.  Now, my question is, how do I create my Detail variable based on these two merged keys?  The "Associated Dimension' only lets me choose one Dimension. 

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

ulisesgarza
Discoverer
0 Kudos

I was finally able to make it work!!

Based on your previous suggestions, this is what I did:

1 - Merged Ded Ben Code from both queries.

2 - Merged Ded Ben Plan Number from both queries as well.

3 - Created a dimension concatenating Ded Ben Code and Ded Ben Plan Number from Query1 and named it varCodePlan1.

4 - Created a detail for the variable I needed (Ded Ben Plan Description) based on Associated Dimension varCodePlan1.

Thank you all!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

create a dim var [conc key1 key2]= Concatenate([key1];[key2]) and define your detail variable associated to this dim var [conc key1 key2].

Regards,

Rogerio

amitrathi239
Active Contributor
0 Kudos

Hi

what are you trying to achive.share  some screenshot..

are you not getting the results when create the detail object of one merged key where one to one record  mapping between key field and description.

Amit

ulisesgarza
Discoverer
0 Kudos

Hi Amit,

Basically on my first query I'm selecting employee checks, their deduction codes, and deduction amounts.  The problem is their deductions are made up of two fields, for example:

Ded Ben Code       Ded Ben Plan Number

Dental                         01

Dental                         02

Dental                         03

I need to get the description for these codes/plans.  On my second query I got:

Ded Ben Code       Ded Ben Plan Number     Ded Ben Plan Description

Dental                         01                                        Employe only coverage

Dental                         02                                        Employe and Children coverage

Dental                         03                                        Employe and Family coverage

I usually only have to merge one set of keys, so when I create a Detail variable, I only point to the single associated dimension it needs and it works, but in this case, there are two keys that I need, and I need to display the "Ded Ben Plan Description" next to the Code/Plan number.

amitrathi239
Active Contributor
0 Kudos

Hi

never tried but try to create first detail variable (var1) associate with one merged dimension.again create detail variable on var1 and  associate with second merged object...something similar to variable inside variable.

Amit