Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

amit_saini
Not applicable

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
Not applicable

Re: YTD average ????

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
Not applicable

Re: YTD average ????


Over here Date is your date field in your application.

Regards

KC

Best Regards,
KC
amit_saini
Not applicable

Re: YTD average ????

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

Thanks
AS

jyothish8807
Not applicable

Re: YTD average ????

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