# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

## Set Analysis Filter

Rigth now I'm using a KPI to calculate the Sales Amount for last year and current month like this

 SUM({\$}TotalVta)

Where vAnioAnt is a variable containing las year (2014),   but right now I need that the KPI calculate the total sales amount for last year but from January to the current Month.  Please help.  Anio is the field containing the Year, Mes is the field containing Month and TotalVta, is the field containing total sales.

Also I need something alike but calculate the total sales from 1 year from now, for example today form may28, 2014 to may 28, 2015, the field containing date for transaction is fecha.

4 Replies
MVP

## Re: Set Analysis Filter

I will provide sample for this.. Kindly change accordingly.

Total Sales For Last Year (Starting From 1st Jan to Today's Date of Last Year

SUM({<Year = {'\$(=Year(Today())-1)'}, Month = {"<=\$(=Month(Today()))>=\$(=Month(YearStart(Today())))"}>}Sales)

Not applicable

## Re: Set Analysis Filter

Thank you for your help but both formulas are not working for me

I change the first one for my KPI

SUM({<Anio = {'\$(=Year(Today())-1)'}, Mes = {">=\$(=Month(YearStart(Today()))<=\$(=Month(Today())))"}>}TotalVta)

And the result is 0, and I double check and I had sales in that period.

For the second formula I change it like this:

On a Bar Chart but in the bar chart I have columns for years and month before today()-365

What could it be?

MVP

## Re: Set Analysis Filter

Provide sample data or sample application. Will work on this..

Not applicable

## Re: Set Analysis Filter

I have problem with the first KPI, and the Line Chart

The First KPI is the one that must SUM TotalVta, for Anio (Year) = Last Year and Mes (Month) BETWEEN January and Current Month

and the Line Chart must show sells from 12 month from now till now with the field TotalVta (Year field = Anio, Month field = Mes, Date field = fecha)

Claus Fuss

Jefe de Sistemas

El 29/5/2015, a las 13:50, Manish Kachhia <qcwebmaster@qlikview.com> escribió:

Set Analysis Filter