Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

arunreddy
Contributor

How to right exprection like this(set analysis)?

Dear all,

how to compare current data with previous month same data (starting from 1st feb to12th feb)

i.e if today date is 12-mar-2012 then i want to sum of sales from 1-mar-2012 to 12-mar-2012.

compare with

previous month same date is 12-feb-2012 then we sum of sales from 1-feb-2012 to 12-feb-2012.

with out selecting any date.

like this

                 product    CM(sales)       PM(sales)

                 alto          2000               6000

                 alto         5000                8000

                 alto         6000                9000

thanks

arun

3 Replies

How to right exprection like this(set analysis)?

Hi,

     Have Day as Dimension.

     Sum({<DateField={">=$(=MonthStart(Today()))<=$(=Today())"}>} Sales) for CM

     Sum({<DateField={">=$(=MonthStart(Today()),-1)<=$(=AddMonths(Today(),-1))"}>} Sales) for PM

Hope it helps

Celambarasan

MVP & Luminary
MVP & Luminary

Re: How to right exprection like this(set analysis)?

Hi,

Try below expressions using Product as Dimension

Current Month = Sum({<DateField={'>=$(=MonthStart(Today()))<=$(=Today())'}>} Sales)

Previous Month = Sum({<DateField={'>=$(=MonthStart(Today()),-1)<=$(=AddMonths(Today(),-1))'}>} Sales)

Hope this helps you.

Regards,

Jagan.

arunreddy
Contributor

How to right exprection like this(set analysis)?

Thanks for reply all.

in my case we are looking for two expression ie CM V/S PM.

we are not consider any dimention,only compare this month uptodate sales with last month same period sales with out selecting any dimenstion.

thanks

arun