Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
coolsapy
Contributor
Contributor

Calculating YTD Transaction Count

Hello,

I need to create a chart in Qlik view which will show the YTD Count of Transaction ID and Sum of Amount.

Date Field is - [Formula - Txn Month]

I have attached the sample excel and .qvw file

I wrote the YTD set expression in the Chart but not working

Regards,

Siba

 

2 Replies
eliran
Creator III
Creator III

Hi,

 

First of all it's common practice to get YTD flags inside the master calendar, in your app there are only three columns, so i'm not sure if you're aware of it.

As for the formula itself, first you got Year & Month fields in the set analysis which are not within the model.

Second of all, the criteria is for YTD last year (-1), so there is no data that match it within the sample data.

Third, Qlik is case sensitive, you wrote Amount where the field name is actually AMOUNT.

Last, you need to make some changes to the set anlaysis part, see the right one below

=sum({$< [Formula - Txn Month]={">=$(=(YearStart(Today(),0)))<=$(=AddYears(Today(), 0))"}>}AMOUNT)

 

Regards,

Eliran.

Brett_Bleess
Former Employee
Former Employee

If the response you received allowed you to get things working, we would appreciate it if you would close out the thread by using the Accept as Solution button on that post to mark things.  This gives the poster credit for the assistance and lets the other Community Members know that was the information you needed.  If you did something else to resolve things, you can post what you did and then use the button on that post.

Here are a couple of other Design Blog posts that may be helpful too:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.