Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Year to Date calculation query

Hello All,

I have a requirement to create a Year to date view of a ticket data coming in. It is a cumulative request and the ticket count should keep accumulating based on the tickets logged each month. If for a particular month there is no ticket details logged, the previous months count should be displayed as is. The counts should be reset at the beginning of every new year. I have created a chart based on the requirements, but I am facing an issue in the scenario wherein if for a particular month there are no tickets logged, no value is being displayed. Please refer to the chart below :

In the chart as you can see, there were no tickets logged for the dark blue section in the month of Dec'16, and the view showing up is incorrect. Similarly for Oct'17. The expression being used is as follows : Aggr(RangeSum(Above(Count(DISTINCT{<,[Nature Of Impact]={'Direct'},[Impact Type]={'High'},[Ticket Number]-={'0'}>}[Ticket Number]),0,RowNo())),Year,MonthofOccurence)

Could you please help out with this issue?

1 Solution

Accepted Solutions
sunny_talwar

How about this

Aggr(RangeSum(Above(Count(DISTINCT{<,[Nature Of Impact] = {'Direct'}, [Impact Type] = {'High'}, [Ticket Number] -= {'0'}>} [Ticket Number]) + Sum({1} 0), 0, RowNo())), Year, MonthofOccurence)

View solution in original post

16 Replies
Anil_Babu_Samineni

Not entire sure, Where we are. But try a luck the below one and suppress when value is not null should not be checked

Sum(Aggr(RangeSum(Above(Count(DISTINCT{<,[Nature Of Impact]={'Direct'},[Impact Type]={'High'},[Ticket Number]-={'0'}>}[Ticket Number]),0,RowNo())),Year,MonthofOccurence))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

try this...

RangeSum(Above(
Aggr(Count(DISTINCT{<,[Nature Of Impact]={'Direct'},[Impact Type]={'High'},[Ticket Number]-={'0'}>}[Ticket Number]),Year,MonthofOccurence)
,0,RowNo()))


krishna20
Specialist II
Specialist II

Hi Palani,

Please refer the attached doc for reference to generate missing records.

Anonymous
Not applicable
Author

Hi John, thanks for your response. I tried out your expression, but it is not providing the required output. It is accumulating it correctly, but doesn't reset the accumulation at the start of a new year. Which is a crucial aspect of the requirement. 

Anonymous
Not applicable
Author

Hi Anil, Thank you for your response. I tried the expression you provided but unfortunately it isn't working too. There has been no change in the accumulation and the display remains as it is.

Anil_Babu_Samineni

What are you trying to have this case instead of Single color?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

The colour is just a classification for different type of tickets, so that doesn't matter. The main issue is the data isn't getting accumulated if there is no entry record or a ticket generated for a particular month.

Anil_Babu_Samineni

To understand better, Make it in straight table first then we can discuss further.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil, based on your suggestion..created a straight table.