Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

YTD average ????

Folks,

I'm having an expression named as % Due Eco = count(X)/count(Y) .  From this how can I calculate YTD average of % Due Eco for current year only???

Thanks,

AS

4 Replies
jyothish8807
Master II
Master II

Hi Amit,

Try this:

Count({<Date={">=$(=Num(YearStart(Max(Date))))<=$(=Max(Date))"}>} X)/Count({<Date={">=$(=Num(YearStart(Max(Date))))<=$(=Max(Date))"}>} Y)

Regards

KC

Best Regards,
KC
jyothish8807
Master II
Master II


Over here Date is your date field in your application.

Regards

KC

Best Regards,
KC
amit_saini
Master III
Master III
Author

KC you understood it wrong, need to calculate YTD average of the whole expression.

Thanks
AS

jyothish8807
Master II
Master II

I guess you mean this:

% Due Eco=Count({<Date={">=$(=Num(YearStart(Max(Date))))<=$(=Max(Date))"}>} X)/Count({<Date={">=$(=Num(YearStart(Max(Date))))<=$(=Max(Date))"}>} Y)

Best Regards,
KC