Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Getting same count on YTD and MTD

Hi,

I am getting same count on YTD and MTD.I have added the sample file please help me to resolve the issue.

Thanks

1 Solution

Accepted Solutions
MayilVahanan

Hi

Please find attached file

Initially zero, because for 2016, there is no below values in Cal_Sour.

ANI/ALI

PHONE

WALK-IN

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
ajsjoshua
Specialist
Specialist

Hi,

Whats ur expression.

bhavvibudagam
Creator II
Creator II
Author

Hi,

These are the expression i have used for YTD and MTD

='YTD = ' & Count({<Year=, Month=, Quarter=, Week=, Date= {">=$(=Num(YearStart(max(Date)))) <=$(=max(Date))"}, CALL_SOUR={'ANI/ALI','PHONE','WALK-IN'}>}NUM_1)

='MTD = ' & Count({<Year=, Month=, Quarter=, Week=, Date= {">=$(=Num(MonthStart(max(Date)))) <=$(=max(Date))"}, CALL_SOUR={'ANI/ALI','PHONE','WALK-IN'}>}NUM_1)

MayilVahanan

Hi

Try like this

='MTD = ' & Count({<Year=, Month=, Quarter=, Week=, Date= {">=$(=Date(MonthStart(max(Date)),'DD-MM-YYYY')) <=$(=Date(max(Date),'DD-MM-YYYY'))"}, CALL_SOUR={'ANI/ALI','PHONE','WALK-IN'}>}NUM_1)

='YTD = ' & Count({<Year=, Month=, Quarter=, Week=, Date= {">=$(=Date(YearStart(max(Date)),'DD-MM-YYYY')) <=$(=Date(max(Date),'DD-MM-YYYY'))"}, CALL_SOUR={'ANI/ALI','PHONE','WALK-IN'}>}NUM_1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
bhavvibudagam
Creator II
Creator II
Author

Hi mayli thank for your reply

It's not working. both the expression initially showing 0.After date selection they are showing values same as my above expression values.

MayilVahanan

Hi

Please find attached file

Initially zero, because for 2016, there is no below values in Cal_Sour.

ANI/ALI

PHONE

WALK-IN

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
maniram23
Creator II
Creator II

Hi,

IN CALL_SOUR what are the data you selected . That data is not there in your 2014th year .

That so your getting "0" value.  Just you can make selection on before Year and any month. Than you will get exact output.

If you know the excel. just tell me how much your getting on 2013th YTD and MTD of 2013th DEC.