cancel
Showing results for 
Search instead for 
Did you mean: 

Count Of Documents after UNION In HANA Model

Former Member
0 Kudos

Hi Experts,

We are facing an issue with count of documents after UNION function, let me elaborate, as we are combining same projections with restrictions, but i have observed that at each projection level we are getting correct count of docs but after union its giving combined result of projections, but i want to see the same count from individual projections as well after the union operation.

Thanks all.

Regards,

Nagendra

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,


I think, you can add a dummy column in each project with a different hard-coded value. Say projection_1 will have value as 1 in Dummy_column1, projection_2 will have value as 2 in Dummy_column2. so after union , you will be getting all the records and also aggregator will not cause a problem.
please let me know if I am missing anything

Former Member
0 Kudos

UNION implicitly performs a DISTINCT, so identical records are only returned once. If you want to return identical records multiple times, you have to use UNION ALL.

Former Member
0 Kudos

Nagendra,

Its not the Union , the Aggregation on top of the union will do the trick...

All the Union does is lays over one record over the other

Thanks

Former Member
0 Kudos

Hi Hari,

Thanks for your response,  but the way you have replied I have already tried but didn't got the expected results, please letme know if any other way available to get the counts.

Regards,

Nagendra

Former Member
0 Kudos

Hi Nagendra,

The aggregation on top of UNION ALL will give you UNION functionality, if all the dimensions are coming from both the sets and different is just measures.

The UNION in calculation view works as UNION ALL. If you want UNION functionality then you can write Calculation View using SQL Script.

If you are looking for a measure which gives you distinct count of your documents, then you can create counter in calculation view.

Regards,

Venkat N.