Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Set Analysis filtering dates

I need help with this issue I'm having.

First off all lets talk about my data

this are my formats

SET TimeFormat='hh:mm:ss TT';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff] TT';

I declare this variables

SET vAnioActual=YEAR(NOW());

SET vAnioAnt=YEAR(NOW())-1;

SET vMesActual=MONTH(Today());

SET vFechaHoy=Now();

SET vFechaAnioAtras = Date#(Now()-365,'DDMMYYYY');

When I bring my data this are my fields that brings date data

LOAD Documento,

    Fecha,

    Date#(Fecha,'DDMMYYYY') As FechaNum,

    YEAR(Fecha) As Anio,

    MONTH(Fecha) As Mes,

     TotalSales............

Where Fecha is my field containing dates in dd/mm/yyyy format

I've been trying to get info of my sales (TotalSales) From the last 12 months from now, I've been trying using, variables, a constant and formulas, but not working at all.    Please help

Thanks in advance

20 Replies
buzzy996
Master II
Master II

try this way,

SUM({<DateDimensionName = {'>=$(=YearStart(Today())) <= $(=Today())'}>} MeasureName)

Not applicable
Author

I change the formula you gave me to this

SUM({<Fecha = {'>=$(=YearStart(Today())) <= $(=Today())'}>} TotalVta)

This is the result

2015-06-16 09.08.15.png

buzzy996
Master II
Master II

is't possible to share ur app?

Not applicable
Author

Not applicable
Author

Could you get the App?

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

SUM({<Anio=,Mes=, FechaNum=, Fecha = {'>=$(=MonthStart(Today(), -11)) <= $(=Today())'}>} TotalSales)

Hope this helps you.


Regards,

Jagan.

buzzy996
Master II
Master II

u mean ur asking to share app for the same from my end?

Not applicable
Author

Thanks for the help, but this was the result

2015-06-16 09.08.15.png

This is a link for my app

Dropbox - Drocaras.qvf

Not applicable
Author

I mean if you could download my App from the link I publish