Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Tue August 31, 2021 01:48 PM

    I'm creating a very basic report where I do a union on two queries from the same source but different filters.  When I try to do a union between them I get the following error:


    RQP-DEF-0537 SubQuery 'Query1' used in a set operation cannot use members or member functions.

    Is this something that's just not allowed?  I double-checked that the column are of the same type and there are no custom fields.  I have no issues when using a DataModule/Dataset.

    Cesar



    ------------------------------
    Cesar Garcia
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Wed September 01, 2021 12:06 AM
    Hi Cesar,
    Would you be able to share the report specification where this error appears.
    This is definitely a concept that is allowed.
    // Henk

    ------------------------------
    Kind regards,
    HENK CAZEMIER
    ------------------------------



  • 3.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Wed January 29, 2025 11:21 AM

    Hank, Is it possible to create a union between two uploaded files in a data module?  I have two simple upload files that have the same structure with just different data values in each.  I can easily create a report which has a union of two files and shows the resulting union data.  I would like to do that in a data module and thought that I could create a Table using SQL in my data module.  Unfortunately I can't seem to do that.  Bottom line is I want to be able to leverage the union of the two uploads across the CA platform not by just creating a report with the union.  Is this at all possible or is the idea of using the functionality in a data module to do that not appropriate or possible with uploaded files.  Thanks.



    ------------------------------
    Bob Smith
    ------------------------------



  • 4.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Wed January 29, 2025 01:56 PM

    You should be able to create an union with two uploaded files with the same metadata.  I confirmed that just now.  I put filters on both of the source files. Are you running into the RQP-DEF-0537 error?



    ------------------------------
    IAN HENDERSON
    ------------------------------



  • 5.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Tue February 11, 2025 12:44 AM

    You should be able to define a set operation (UNION, INTERSECT or EXCEPT) involving two or more "flat files".

    As with relational systems, a set operation requires that the the number of projected columns is the same and that the types are compatible.

    Where compatible means there is a "super type" that can be used to represent the different data types that the column from each "table" may contain.

    Do you have a support ticket open where you provided a copy of your report/model?


    As a reference, see the rules re appending where file upload considers the types of the existing table vs the new data being added.


    https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=files-data-type-compatibility-while-replacing-appending



    ------------------------------
    NIGEL CAMPBELL
    ------------------------------



  • 6.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Wed September 01, 2021 05:00 PM
    Check your "Query1" to make sure you don't have any filters there.  I'm figuring that Query1 collects all the records from the other two queries.​  Also, check each data item to make sure they are pulling from the union.  [Union1].fields
    mm

    ------------------------------
    Mark Mikkelson
    ------------------------------



  • 7.  RE: Report Error (RQP-DEF-0537) When Creating Query Union

    Posted Wed September 01, 2021 05:25 PM
    I eventually removed all filters and any expressions and still the issue persisted.  I did make sure that the fields were from the union.  For the sake of time, I just move this to a dataset and it seems to not be giving me any issues.  I don't specifically manage the data sources, so I'm not sure if this is an issue with framework manager.  Thanks for your help.

    Cesar

    ------------------------------
    Cesar Garcia
    ------------------------------