Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
New Contributor III

comparaison between budget for the same period of time but for this year and the last year

I need to do a comparaison between budget for the same period of time but for this year and the last year

from to the beginning of the month till to day

=Sum({1< [Date Time]={'>=$(=MonthStart(Today()))<=$(=Today())'}>}[CA TTC] )

How to do the same but for the last year

I mean how to calculate for example sum of CA TTC from 01/09/2014 till 09/08/2014

I try =Sum({1< [Date Time]={'>=$(=MonthStart(Today()-1<=$(=Today()-1}>}[CA TTC] ) but it doesn't work ?

1 Solution

Accepted Solutions
Highlighted

Re: comparaison between budget for the same period of time but for this year and the last year

May be this:

=Sum({1<[Date Time]={"$(='>=' & MonthStart(AddYears(Today(), -1)) & '<=' &  AddYears(Today(), -1))"}>}[CA TTC])

View solution in original post

4 Replies
Highlighted

Re: comparaison between budget for the same period of time but for this year and the last year

Are you doing this in a chart or a text box object???

Highlighted

Re: comparaison between budget for the same period of time but for this year and the last year

May be this:

=Sum({1<[Date Time]={"$(='>=' & MonthStart(AddYears(Today(), -1)) & '<=' &  AddYears(Today(), -1))"}>}[CA TTC])

View solution in original post

Highlighted
New Contributor III

Re: comparaison between budget for the same period of time but for this year and the last year

yes in a chart

Highlighted
Honored Contributor III

Re: comparaison between budget for the same period of time but for this year and the last year

=Sum({1< [Date Time]={'>=$(=AddYears(Max([Date Time]),-1))<=$(=Max([Date Time]))'}>}[CA TTC]

Make sure that your date formats match

hth

Sasi