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?

16 Replies
Anil_Babu_Samineni

Looks like you doesn't have Accumulated value. Can you attach the file to test

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
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)

Anonymous
Not applicable
Author

For your reference.

sunny_talwar

Does this look right?

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny, this expression worked perfectly. Thanks a lot. Could you please explain this expression, as I couldn't figure out what was wrong ?

sunny_talwar

Just added a dummy value for all those MonthYears where they were null because of your set analysis.... the dummy value is Sum({1} 0) which allows you to accumulate as the value for the month year is now 0 instead of null.

Anonymous
Not applicable
Author

Great, thanks a lot.