cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve coming results in BEX

Former Member
0 Kudos

Hi

I report from ODS.

Data are:

Doc.num Country Poz.num

1 US 1

2 GB 1

2 GB 2

3 US 5

4 US 2

4 US 3

Result:

Country Amount of doc.

US 3

GB 1

Regards

Adam

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

You can use country in rows & Amount of DOc. in columns

lemme know how Amount of Doc is caluculated,I can explain how to do so in query designer

Thanks & Reagrds

Sriman

Former Member
0 Kudos

Hi

Logic of query is:

Select country, count(max(poz.num) from

(Select doc.num, country, max(poz.num) from table

group by doc.num, country)

group by country

Select only one row on each doc.num

irrespective of what value the poz.num is taking on.

Not all doc.num included poz.num = 1.

Regards

Adam