Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rammuthiah
Creator III
Creator III

How to show Top customer as per monthwise

Can anybody help in this?

I want this output :

MonthTop Customer

Sales by Customer

% Contribution
Jan 2016Arun1000012%
Feb 2016Sam1500016%
Mar 2016Arun1200015%
Apr 2016Vinoth900010%
1 Solution

Accepted Solutions
rahulpawarb
Specialist III
Specialist III

Hello Ram,

Trust that you are doing great!

Please refer the sample application attached herewith.

Regards!

Rahul

View solution in original post

9 Replies
tresesco
MVP
MVP

And what is your input? Try to prepare a sample qvw and share.

jayaseelan
Creator III
Creator III

Hi Ram,

     Please post any example data, let us try.

Thanks,

rammuthiah
Creator III
Creator III
Author

Row No

Date

Customer

Sales

1

04/18/12

Aadi

  1. 29912.5

2

04/18/12

Aadidev

  1. 13333.4

3

01/06/09

Aadil

121428

4

01/28/09

Aadinath

35625

5

01/31/09

Aadir

35625

6

02/01/09

Aadit

35625

7

02/19/09

Aaditeya

4800

8

02/22/09

Aaditya

  1. 10779.6

9

02/23/09

Aadrian

  1. 10779.6

10

02/24/09

Aagam

114085

11

02/25/09

Aagney

114085

12

02/26/09

Aagneya

179900

13

02/28/09

Aahan

179900

14

03/01/09

Aadi

179900

15

03/02/09

Aadidev

147000

16

03/03/09

Aadil

111308

17

03/08/09

Aadinath

22400

18

03/10/09

Aadir

22300

19

04/20/09

Aadit

255156

20

04/22/09

Aaditeya

255156

21

04/26/09

Aaditya

255156

22

04/27/09

Aadrian

255156

23

04/28/09

Aagam

255156

24

05/01/09

Aagney

255156

25

04/29/09

Aagneya

255156

26

05/03/09

Aahan

255156

27

05/04/09

Aadil

255156

28

05/05/09

Aadinath

  1. 53480.6

29

05/06/09

Aadir

  1. 53480.6
rahulpawarb
Specialist III
Specialist III

Hello Ram,

Trust that you are doing great!

Please refer the sample application attached herewith.

Regards!

Rahul

rammuthiah
Creator III
Creator III
Author

It works..Great

rahulpawarb
Specialist III
Specialist III

Cheers,

Rahul

rammuthiah
Creator III
Creator III
Author

Thanks Rahul

rammuthiah
Creator III
Creator III
Author

Is there any other way to do the same?

rahulpawarb
Specialist III
Specialist III

Hello Ram,

We can achieve the same using below sample script:

SalesData:

LOAD DATE#(Date, 'MM/DD/YYYY') AS Date,  DATE(DATE#(Date, 'MM/DD/YYYY'), 'MMM YYYY') AS Month, SalesRep, Sales;

LOAD * INLINE [

Date, SalesRep, Sales

01/01/2017, Arun, 12000

01/01/2017, Sam, 11000

01/01/2017, Vinoth, 10000

02/01/2017, Arun, 12000

02/01/2017, Sam, 17000

02/01/2017, Vinoth, 11000

03/01/2017, Arun, 21000

03/01/2017, Sam, 11000

03/01/2017, Vinoth, 11200

04/01/2017, Arun, 22000

04/01/2017, Sam, 31000

04/01/2017, Vinoth, 40000

];

//Get the Total Sales for every month

INNER JOIN

Data:

LOAD Month

            ,Sum(Sales) AS MonthlySales

Resident SalesData

Group By Month;

//Get the Maximum Sales for every month

INNER JOIN

Data:

LOAD Month

            ,Max(Sales) AS Sales

Resident SalesData

Group By Month;

Also refer the attached sample application.

Hope this will help.

Regards!

Rahul