Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to compare current date with last date ?

hi, i have a problem, i need to compare a especific date with a last date (for example 1/10/2011 with 1/10/2010) and this show the sum of sales,

I created a report with these data but the chart shows me the information of the two separate years and I need to display them in the next column.

i attached file with the example, i hop you can help me please


3 Replies
Sokkorn
Master
Master

Hi Beto,

Actually the main purpose of set analysis is used to compare between (Year, Quarter, Month, Week). So you should remove one dimension called <fecha> in you pivot table.

Try to use one dimension (cliente) and two below expression:

1. For the current selection Year: SUM({<año={$(=Max(año))}>} ventas)

2. For last year: SUM({<año={$(=Max(año-1))}>} ventas)

Check the attached file.

Hope this help.

Regards,

Sokkorn

Not applicable
Author

hi sokkorn , , i tried to do it before, bu t i need to present the  data per date like the next way

customer, date, sales 2011, sales 2010

NT,10/10/2011,5000,4500

NT,09/10/2011,6000,5500

NT,08/10/2011,7000,6500

i try to do with function TOTAL  sum({1}total <fecha>ventas ) ,but this way show all the dates and it does not respect the selection, it's possible  to add more function (aggr) in this function , i don't know how to do it

swuehl
MVP
MVP

Hi Jorge,

maybe like attached?

I changed your second dimension to:

=num(Day(fecha),'00')&'/'&num(month(fecha),'00')&'/'&$(v_año)

Hope this helps,

Stefan