# Add comparision values on Sale Reporting

**URL:** https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244
**Category:** Ideas
**Created:** [September 21, 2020, 11:14am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244 "2020-09-21T11:14:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 11:14am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/1 "2020-09-21T11:14:37Z")

</div>

We had a request from one of our customers to be able to compare the values in sale reporting (of a customer, a product or a category) with the values of another date period.

The idea is to see how much we sold a product in a year compared to the previous year.

Do you think this is something we can inclue by default on sale reporting?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 11:23am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/2 "2020-09-21T11:23:21Z")

</div>

I do not think so because you can set the period to year and get the result for multiple years.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 11:24am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/3 "2020-09-21T11:24:53Z")

</div>

I do not mean setting the period but having two date filters and two fileds for number and amount.

Similar to what we use in accounting with the comparision flag.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 11:26am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/4 "2020-09-21T11:26:14Z")

</div>

This is exactly the same but sale reports are more flexible because they work for many kind of period and date ranges.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 11:27am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/5 "2020-09-21T11:27:21Z")

</div>

> [@ced](#):
>
> they work for many kind of period and date ranges

I’m not sure to follow you here. How a sale report can work for many date ranges?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 11:28am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/6 "2020-09-21T11:28:36Z")

</div>

> [@pokoli](#):
>
> How a sale report can work for many date ranges?

You can fill whatever date range you want.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 11:33am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/7 "2020-09-21T11:33:08Z")

</div>

> [@ced](#):
>
> You can fill whatever date range you want.

Yes but only one date range per screen which does not allow to compare the values of a period with the values of a previous period.

Our requirement is to be able to compare diferent periods on the same screen (like we do on Balance Sheet and Profit and Loss).

Currently is very dificult to compare amounts of the same product in diferent periods.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 11:38am UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/8 "2020-09-21T11:38:44Z")

</div>

> [@pokoli](#):
>
> Yes but only one date range per screen which does not allow to compare the values of a period with the values of a previous period.

It does as you select also the period.

> [@pokoli](#):
>
> Currently is very dificult to compare amounts of the same product in diferent periods.

Here is an [example showing for comparison the sales of a product for multiple months](https://demo5.6.tryton.org/#demo5.6/model/sale.reporting.product.time_series;domain=%5B%5B%22product%22%2C%22%3D%22%2C1%5D%5D&context=%7B%22context_model%22%3A%22sale.reporting.context%22%2C%22company%22%3A1%2C%22from_date%22%3A%7B%22 __class__ %22%3A%22date%22%2C%22year%22%3A2019%2C%22month%22%3A9%2C%22day%22%3A21%7D%2C%22period%22%3A%22month%22%2C%22to_date%22%3A%7B%22 __class__ %22%3A%22date%22%2C%22year%22%3A2020%2C%22month%22%3A9%2C%22day%22%3A21%7D%2C%22warehouse%22%3Anull%7D&context_model=sale.reporting.context&name=%22Sales%20per%20Product%20(A5%20Paper%20250)%22&views=%5B537%2C538%2C539%5D).

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 1:21pm UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/9 "2020-09-21T13:21:43Z")

</div>

Ok, now I understand you. This works but it forces the user to open record one by one to see the comparision and it only includes the values in the range.

Maybe our requirement is too specific, but we want to see in the product list the value of the current period and the previous period. Something like:

```auto
| | Number | Amount | Number | Amount |
| ------------- | ------ | --------- | ------- | ----------- |
| Product A | 2 | 10.000 € | 4 | 20.000 € |
| Product B | 7 | 7.000 € | 4 | 4.000 € |
| Product C | 4 | 10.000 € | 0 | 0 € |
| Product D | 0 | 0 € | 4 | 13.000 € |

```

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 1:35pm UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/10 "2020-09-21T13:35:19Z")

</div>

This goes against the design principle of the reporting.  
Indeed your request is not a useful report because in contrary to the existing report it does not show any trends, it does not work for different kind of selling patterns (recurring, seasonal etc.) and on large sets it is not usable.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 21, 2020, 3:50pm UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/11 "2020-09-21T15:50:29Z")

</div>

> [@ced](#):
>
> design principle of the reporting.

Which design principle?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 21, 2020, 9:47pm UTC](https://discuss.tryton.org/t/add-comparision-values-on-sale-reporting/3244/12 "2020-09-21T21:47:19Z")

</div>

The timeseries with trends.
