6 Replies Latest reply on Dec 26, 2016 9:28 PM by lei.chen.0

# Show last 15 days Sales and Quantity

Hi All,

I have a date field, from that i want to show from today date to  last 15 days sales and quantity manually.

So plz help me how to create the calculation of last 15 days sales and quantity.?

Thanks and Regards,

Triveni.

• ###### 1. Re: Show last 15 days Sales and Quantity

Hello triveni,

show from today date to  last 15 days sales and quantity manually.

What did you mean by "manually"?

Your requirement can be simply solved by Quick Start: Relative Date Filters

But if you mean not using filter by "manually", you can the calculation such as,

SUM(IIF(DATEDIFF('day',[Order Date],TODAY())<=15 AND [Order Date]<=TODAY(),[Sales],0))

Regards.

• ###### 2. Re: Show last 15 days Sales and Quantity

Hello Lei Chen,

Manually means without applying the date filter, by using cal field it should show last 15 days sales.

The cal which you sent  was correct but here in my data i applied blending,  so DATE FIELD is from one data and SALES FIELD is from other data.

Cal showing error. How it is possible in this case?

• ###### 3. Re: Show last 15 days Sales and Quantity

Hello TRIVENI,

Could you please attach a sample workbook?

It's necessary to have a look at the relationship of your datasources and the view you're creating before actually creating the calculated field.

Regards.

• ###### 4. Re: Show last 15 days Sales and Quantity

Hi Triveni,

Please share the relationship that you have established for the blending. I would also like to know if the date field is in the both the tables. It would be great if you can share the workbook.

Thanks and Regards,

Ashish Chaudhari

• ###### 5. Re: Show last 15 days Sales and Quantity

Thanks

Triveni

• ###### 6. Re: Show last 15 days Sales and Quantity

Hello TRIVENI,

I have two questions.

1) what's logic between Sales(Purchase Date) and Inventory (Date)?

In your requiements, "last 15 days sales" is required but Sales(Purchase Date) should not be used.

I'm a little confused, so could you explain the logic between the two dates?

2) how do you deal with sku field?

Datasource inventory has 598 unique sku's

Datasource sales has 743 sku's

They are N-to-N, but sku is defined as linked field.

Regards