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

Get how many tickets were generated in the month before the chosen one

Hello Community! I'm just entering what is Qlik Sense and I have a doubt that I can not solve it for several days.

I want to get how many tickets have been made in the month before the one chosen. For example, I choose the month March of the Year 2018, and I want to show the Number of Tickets for March and also, for February.

The code to appear the previous month, I can not find it. I attach the data.

The important column is: Fecha_Crea

Thanks in advance

15 Replies
MK9885
Master II
Master II

Your have changed the month field name...

Use below expression now...

Count({  <Num_Fecha = {  $(=Max(Num_Fecha)  )}>+<[Fecha_Crea.autoCalendar.Month]= {"<=$(=num([Fecha_Crea.autoCalendar.Month])-1)"},


Num_Fecha = {  $(=Max(Num_Fecha) - 1)} >}Ticket)

Anonymous
Not applicable
Author

But it shows me a wrong number, I am choosing Year 2018 Month June and it should show me on Previous Month: 217

MK9885
Master II
Master II

Sir,

I'm getting the 2 months data.

Not sure where you looking at?

I've attached the QVF file as well

Check the straight table in the app and select May & Jun.. or export 2018 data to XL and filter on just May and June to see the counts

Anonymous
Not applicable
Author

Srry, u didn't understand me. I don't want to select 2 months, because i have to add more graphics and they have to show me information about 1 month. So, I need to select just one month and one year, and it has to show me (for example, on a KPI Graphic) Total of tickets of Previous Month that I selected.

Something Like : Current Month(Selected) vs Previous Month

MK9885
Master II
Master II

You should term Month on Month Comparison


Anyway, use below expression,

Count({  < Num_Fecha = {  $(=Max(Num_Fecha) - 1)},[Fecha_Crea.autoCalendar.Month] >}Ticket)

2018-07-10_140847.png

I selected Jun and 1st KPI shows June Count and 2nd KPI shows May Count.

Anonymous
Not applicable
Author

Thanks for ur patience !