Skip to Content

Workbook : Problem of Overlapping two query

Hi All,

I want to add two query in one Workbook sheet. so that i took two grid analysis when i display report the coloums in two queries are overlapping.

Please help me out.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2015 at 01:34 PM

    Hello Suhas,

    There is a VBA solution:

    First make sure the second query is far enough never to be overlapped by the first query.

    After the refresh, call the following sub, of course, changing the code to point to your specific locations.

    This code leaves at most 2 columns between your requests

    ( Tested in Excel 2010 on Windows 7)

    Hope this solves your problem

    Sub hideSpaceBetweenQueries()

    Sheets("ResultsSheet").Activate

    Sheets("ResultsSheet").Select

    ' First ColumnTitle cell from Query 1

    ' First empty cell before Query 2

    Call hideUnusedColumnsBetween(ActiveSheet.Range("A1"), ActiveSheet.Range("BZ1"))

    End Sub

    Private Sub hideUnusedColumnsBetween(req1ColumnTitle1 As Range, firstEmptyCellBeforeReq2 As Range)

    Dim j As Integer

    Dim titleRow As Integer

    titleRow = req1ColumnTitle1.Row

    ' UnHide columns if they were

    Range(req1ColumnTitle1, firstEmptyCellBeforeReq2).EntireColumn.Hidden = False

    j = req1ColumnTitle1.Column

    ' I rely on the cell interior color to know if the title cell contains data

    Do While Cells(titleRow, j).Interior.Color <> firstEmptyCellBeforeReq2.Interior.Color _

    And j < firstEmptyCellBeforeReq2.Column - 1

    j = j + 1

    Loop

    If j < firstEmptyCellBeforeReq2.Column - 1 Then

    Range(Cells(1, j + 1), Cells(1, firstEmptyCellBeforeReq2.Column - 1)).EntireColumn.Hidden = True ' This leaves 2 blank columns

    End If

    End Sub

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2015 at 08:28 AM

    Hi Suhas,

    Below steps may help to add multiple queries in one workbook sheet

    1. Create queries you would like to join.

    2. Open one of the queries in BEx Analyzer and save it as a workbook.

    3. Create two additional tabs in the workbook, and give them names (e.g., query2, results)

    4. Edit the query2 tab by adding design items: click BEx Analyzer > Design Toolbar > Insert Analysis Grid

    5. Click on the Properties dialog box, change Data Provider's name and click create button.

    6. Choose the second query and confirm your choice.

    7. Create a table, on the result tab, that merge data form both queries. Save the workbook.

    Thanks,

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2015 at 08:42 AM

    Dear Suhas,

    Go to Design Mode, and change the range of the analysis grid so that it doesn't overlap, Means if your one Analysis grid is taking range suppose from G14:I60, then change second analysis grid range starting from J14:L60.

    Thanks

    Vijayendra


    pastedImage_0.png (63.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 07, 2015 at 05:19 AM

    Hi Suhas,

    It is the expected behavior, if you place two queries side by side using analysis grid. Then it will overlap when you drilldown with more than one characteristics.

    Suggest you to place in two different sheets of same workbook to avoid the overlap. In case if you have fixed columns then calculate accordingly and place the Bex Queries.

    Thanks,

    Umashankar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.