You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

convert column data to rows(pivot)

Accepted answer
26
Views
10
Comments
edited Jul 26, 2020 4:37AM in Reporting and Analytics for ERP 10 comments

Content

i create sql statement and the result is 

customer

period

No_of_invoices

Cust1

Jan-2020

7

Cust1

feb-2020

9

Cust1

mar-2020

4

Cust1

apr-2020

6

Cust1

may-2020

3

Cust1

Jun-2020

2

Cust1

Jul-2020

1

Cust1

aug-2020

5

Cust1

sep-2020

5

Cust1

oct-2020

7

Cust1

nov-2020

8

Cust1

dec-2020

4

Cust2

Jan-2020

5

Cust2

feb-2020

6

Cust2

mar-2020

3

Cust2

apr-2020

2

Cust2

may-2020

1

Cust2

Jun-2020

8

Cust2

Jul-2020

9

Cust2

aug-2020

5

Cust2

sep-2020

4

Cust2

oct-2020

3

Cust2

nov-2020

2

Cust2

dec-2020

6

 

the customer want the output like

 

 

 

Jan-2020

feb-2020

mar-2020

apr-2020

may-2020

Jun-2020

Jul-2020

aug-2020

sep-2020

oct-2020

nov-2020

dec-2020

total

Cust1

7

9

4

6

3

2

1

5

5

7

8

4

61

Cust2

5

6

3

2

1

8

9

5

4

3

2

6

54

 

12

15

7

8

4

10

10

10

9

10

10

10

115

 

i need a solution whether use sql statement or template .

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!