Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Data Works for AI is here - Join the discussion and enter to win a pair of Qlik kicks: Join the Conversation!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Group customer codes to get total sales

Hello-

I am trying to get a sum of sales by a customer grouping however that total sale is not held as a field in our software.  For example I have certain customers I would like to group together and get their sales by MTD and YTD.

Cust code:

MEN1

MEN2

Then I would like a total

LWE1

LWE2

LWE3

Then I would like a total

HD1

HD2

HD3

Then I would like a total

It's not  for all customers though, only some of them.  Once I get the sums per customers, I would like to then put those totals by customer on a graph.

MEN Total

LWE Total

HD Total

Can anyone tell me how I can group these together to get their sales by MTD/YTD?

Thank you

Jennifer

Labels (1)
11 Replies
Anonymous
Not applicable
Author

Ooops! Sorry, completely messed that up.  This should be better :

Customers:

Load

    "ADDRESS_1",

    "ADDRESS_2",

    "ACRONYM",

      "CUSTOMER_CODE",

    if ( wildmatch ( '[CUSTOMER_CODE] ,  'MEN*', 'HDC*', 'LWE*' ) ,

    PurgeChar( [CUSTOMER_CODE] ,'0123456789') ,null() )  as [CUSTOMER_PREFIX] ),

    "CUSTOMER_TYPE"

     etc......

Sql Select *

FROM "CUSTOMER MASTER FILE";

Anonymous
Not applicable
Author

That did it!  This will be helpful for some other customers I may need to do something similar with.  Thank you for your time and help!