Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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

View solution in original post

6 Replies
Specialist
Specialist

Hi,

Whats ur expression.

Creator II
Creator II

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)

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
Creator II
Creator II

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.

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

View solution in original post

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.