Multiple columns in a Single Column

There are certain times where we require multiple columns in a single column. For eg there is a Plan Name and Plan Type where the client doesn’t want to drill down to the next level but wants to see the Totoal Amount of all the Plan Name and Type together. For this we can use this method from the Analytics itself to bring about the changes.

In the below example First I am going to pull Year and Amount and then Plan Name and Amount for better understanding. Here I want to merge the Year and Plan Name in a single column

1.First Open and Analysis and pull in the Year and Amount

  


 2. Now go to the Advanced Tab and copy the SQL




3. Do not close this analysis and Open a new analysis and pull in the Plan Name and Amount column. Go to the advanced tab and click on New Analysis as shown below.



4. Now paste the earlier SQL and bring about modification. Basically what we are doing here is that we are applying a union in the two SQL so that it can be visible in a single column.

Edit the SQL as mentioned below.



Click on OK and then you can see the YEAR and PLAN NAME column in a single column




Using this method we can merge 2 or more columns into a single column.

Try this out and if you have any doubts do get back.

Cheers !!
Jethin



Advertisements

One thought on “Multiple columns in a Single Column

  1. Here is the error I get. Wondering if I am missing a key data point or key piece of knowledge on this:

    View Display Error

    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27003] ORDER BY subclause: column number 2 is out of range. (HY000)
    SQL Issued: SELECT “- Uno Incidents”.”Resolved Date” saw_0 FROM “Technology – UET Remedy Engineering” union SELECT 0 s_0, “Technology – UET Remedy Engineering”.”- Uno Incidents”.”Date Created” s_1 FROM “Technology – UET Remedy Engineering” ORDER BY 1, 2 ASC NULLS LAST FETCH FIRST 10000001 ROWS ONLY

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s