Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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