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

How to see Revenue one year back in Expression?

Hi, QlikView community

I have one issue I wanted to solve

Here below I have the data. Just a plain sales data.

I am doing an analysis for the SalesRep in my company.

They want to know what their how much they are selling e.g. Sum (Revenue), YTD.

But I got one request that I do not know how to solve.

They want to know what their Sum(Revenue) is from this day a year ago until today (one year back)

So I explain this request better. The SalesRep want to know when they open qlikview e.g. on the date 10. april 2015 they can see the Sum(Revenue) from 10. april 2014 until 10. april 2015.

Any have any ideas?

  

OrderDateSalesRepItem         Units   Unit Cost    Revenue
1.6.2014JonesPencil951,99189,05
1.23.2014KivellBinder5019,99999,5
2.9.2014JardinePencil364,99179,64
2.26.2014GillPen2719,99539,73
3.15.2014SorvinoPencil562,99167,44
4.1.2014JonesBinder604,99299,4
4.18.2014AndrewsPencil751,99149,25
5.5.2014JardinePencil904,99449,1
5.22.2014ThompsonPencil321,9963,68
6.8.2014JonesBinder608,99539,4
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Check out the attached file.

Just change the no. format in the attached file for last year sales

UG

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Check out the attached file.

Just change the no. format in the attached file for last year sales

UG

pokassov
Specialist
Specialist

Hi!

You can use this like expression.

Sum({$<OrderDate={'>=$(=date(AddYears(today(),-1)))'}>}Revenue)

Meanwhile, I see data format in qv settings (D.M.YYYY) is different from data (M.DD.YYYY).

So you have to solve this problem too.

demoustier
Creator
Creator

Hi,

You can try with the age function and sum with filter selection order_age=0

Krgrds

Not applicable
Author

You can try the attached solution.

Thanks!