Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sn_9052
Contributor II
Contributor II

Calculating the Number of Tickets of last 3 months

Hi ,

Can any one help in calculating count of Tickets in the last 3 months of data.

3 Months data should be calculated as per the selection made in "Month" ListBox.

For Ex: If we made selection of Sep,

then its need to show  count of Tickets  for July,Aug and Sep till date months.

Please do Needfull with the Expression.

Thank You.

 

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Check attached qvw.

If both a month and year is selected it will show 3 months (current and 2 previous). Else it will show selected values

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

You should be able to use set analysis to achive that. but can you share sample data so i can share a relevant expression.
but assuming you have a master calendar try something like below where Month year is selected

Sum( {<MonthYear=,OrderDate={"<=$(=Date(MonthEnd(Max(OrderDate)))) >=$(=Date(MonthStart(AddMonths(Max(OrderDate),-2)))) "}>} OrderRecordCounter)
sn_9052
Contributor II
Contributor II
Author

Hi,

Thanks for Replying ,

Please find the below data  and snap.

In Below snap,If we select 2017 year , It should display count of Tickets of all the Months.

If we select the June Month , I need to get the Count of 'Apr','May' and Jun Month data(Last 2 months data along with the selected month).

clipboard_image_0.png

dplr-rn
Partner - Master III
Partner - Master III

Check attached qvw.

If both a month and year is selected it will show 3 months (current and 2 previous). Else it will show selected values

sn_9052
Contributor II
Contributor II
Author

Hi,

Thanks a lot 🙂

Expression is giving correct values.

Thanks once again.