cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify a specific query in a combined query based on a universe with contexts

mdelisle75
Member
0 Kudos

Hello community,

In combined queries (query1 UNION query 2 UNION query3 ...) I used to add a constant object in each query in order to know where the row is coming from (query 1, 2 or 3 for example). Recently, instead of creating many specific constants' dimensions, I added to the universe only one dimension object called "Sequence" built on a table which contains a hundred rows starting from 1 to 100. Using this object cause a cartesian product, but since I specify the sequence value I want in the filter section, there's no effective cartesian product :

SELECT cst_num.val, dim_date.num_an FROM cst_num, dim_date WHERE cst_num.val = 1

In order to have this, I had to authorize cartesian products on the data foundation.

Since I add contexts to the universe, this doesn't work anymore. 2 separated queries are generated as if dimensions where coming from different contexts.

Both dimensions can no longer be combined in the same report.

There is still the initial option: creating many constants objects in the universe. Any idea to avoid this and keep a solution based on cross join solution while having contexts in the universe ?

Best regards,

Michel

former_member34
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since you are new here, I recommend that you familiarize yourself with our Q&A Tutorial: https://developers.sap.com/tutorials/community-qa.html, as it provides tips for preparing questions that draw responses from our members. Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM

Many thanks!

Accepted Solutions (0)

Answers (0)