Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
342dssf
Contributor II
Contributor II

How to count only the filtered month

I'm working on a ticket panel, where I have the opening date and closing date of tickets. I would like to create a chart that compares these 2 values ​​- Number of open calls and number of closed calls.

342dssf_0-1672019366659.png

I'm working on a ticket panel, where I have the opening date and closing date of tickets. I would like to create a chart that compares these 2 values ​​- Number of open calls and number of closed calls.

 

The number of open calls is correct. The number of calls closed is being divided between Sep, Oct and Nov, and it would be necessary to count everything in November, adding the 3 the result is correct, but it would need to count everything in November.

 

Here are the parameters used to build the graph:

Dimension: Month Opening

Measure - Open calls: Count({$<Status2 = {'New', 'Processing','Pending','Concluded','Resolved'}, SEMANA_FECHAMENTO=,Dt_Closing=, YEAR_CLOSING=, MONTH_CLOSING=, DAY_CLOSING>} Status2 ) -IT'S OK

 

Measure - tickets closed: Count({$<Status2 = {'Concluded'}, SEMANA_ABERTURA=,Dt_Abertura=, ANO_ABERTURA=, MES_ABERTURA=, DIA_ABERTURA>} Status2) - WRONG

 

Analyzing the data in table format, I identified that there are calls that were opened between Sep, Oct and Nov and that were closed only in November, but since I am using the filter Month closing = November it should be adding everything for the closing month.

 

 

 

 

342dssf_1-1672019445070.png

 

 

 

1 Reply
jcmachado
Contributor III
Contributor III

In order to count only the filtered month for closed calls, you should use the Month_Closing dimension instead of Month_Opening in your measure for closed calls.

Here's an example of how you can modify your measure:

Measure - tickets closed: Count({$<Status2 = {'Concluded'}, Month_Closing = {'November'}>} Status2)

This measure will only count the tickets that were closed in the month of November, regardless of when they were opened.

You can also use the variable in place of 'November' if the variable is storing the month you are looking for.

Please let me know if you have any further questions or if this solution is not working for you.