12 Replies Latest reply on Nov 15, 2018 12:05 PM by Deepak Rai

Sum of sales for customers' first orders

Hi, first post here. I'm trying to figure out how to calculate the sum of sales of the first orders of all customers. I've searched all over the internet and couldn't find a solution. I did find a method of identifying first orders based on something akin to IF [Order Date] = MIN([Order Date]), but that will include multiple orders if a customer makes two orders on the day she makes her first order. Any ideas?

• 1. Re: Sum of sales for customers' first orders

It is interesting Question. Do you have a dataset, because Superstore data might not give you what you need. So Please fake few lines of data set.

Thanks

Deepak

• 2. Re: Sum of sales for customers' first orders

Hi Deepak, thank you for the quick reply. I was actually hoping to get an answer based on the Superstore data. I believe the only fields we'll need from it are Customer ID, Order Date, and Sales, I just don't know what to do with them!

• 3. Re: Sum of sales for customers' first orders

Ok..

• 4. Re: Sum of sales for customers' first orders

I just realized what you meant by the data not having what I need. I've attached a modified version that has multiple orders on the first order date for Customer ID = 3.

• 5. Re: Sum of sales for customers' first orders

Hi Alex,

Here it Is: You have to Find Minimum Date and First Order from ROW ID for That Date.

I have added total Sum for First Order of all Customers also which would be a single value.

Thanks

Deepak

If it Helps, Pl Mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• 6. Re: Sum of sales for customers' first orders

Thank you! Could you please explain what's going on with the First Order Sales Per Customer calculation? The fixed calculation nested within another fixed calculation confuses me.

• 7. Re: Sum of sales for customers' first orders

As I Said:

This Gives You Minimum Date Per Person

Ignore Colon above

Now we have to Find Minimum Order with in that Minimum Date Per Person

Since FIXED LOD Can Serve as a Dimension,

I used it as it is and found Minimum ROW ID FOR A PERSON FOR ITS MINIMUM DATE..Right?

THEN that Value is to be compared with actual ROW ID

and then wrote an IF Statement

ZN(IF ...............................................)THEN Sales END

This Returns me the Sales Per Person for its Minimum Row within its minimum date, So First Order within First Date.

Hope this is Helpful.

Deepak

1 of 1 people found this helpful
• 8. Re: Sum of sales for customers' first orders

Thank you. I noticed in the dataset that several row IDs can have the same Order ID. Customer 14's first order is an example of this, and we're only capturing part of the sales from that order. Simply replacing Row ID with Order ID in the First Order calculation doesn't seem to fix the issue.

• 9. Re: Sum of sales for customers' first orders

Let Me C

• 10. Re: Sum of sales for customers' first orders

You Want To Capture the Entire Order  Here:

Like you want 1164.45 or sum wherever the Order ID is 86838?

• 11. Re: Sum of sales for customers' first orders

For order 86838 I want to get a Sales of 1214.93.

• 12. Re: Sum of sales for customers' first orders

Here it Is:

If you Format it it will return you 1214.93

Thanks

Deepak