Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

venanciop
New Contributor II

Month and year funtions not working

I f I use like this works


=Sum({<AnoAdmissao ={2015},MesAdmissao={10},DescricaoSituacao = {Ativo}>}Qtd_colaboradores)


But when I use the script below it doesn't work:


=Sum({<AnoAdmissao =Year(Today()),MesAdmissao=Month(Today()),DescricaoSituacao = {Ativo}>}Qtd_colaboradores)

Could anyone help?

Tags (2)
7 Replies
MVP
MVP

Re: Month and year funtions not working

sum({$ <

     AnoAdmissao ={"$(=year(today()))"},

     MesAdmissao={"$(=num(month(today())))"},

     DescricaoSituacao={Ativo}>

     }

     Qtd_colaboradores)

nizamsha
Valued Contributor

Re: Month and year funtions not working

=Sum({<AnoAdmissao =

{"$(=Year(Today()))"},

MesAdmissao={"$(=Date( Month(Today())),'MM')"},

DescricaoSituacao = {"Ativo"}>}Qtd_colaboradores)

amithmurali
Contributor

Re: Month and year funtions not working

sum({$ <

              AnoAdmissao = {"$( =year(today()))"},

              MesAdmissao = {"$( =num(month(today())))"},

              DescricaoSituacao ={Ativo}

         >} Qtd_colaboradores)

neetha_p
Honored Contributor

Re: Month and year funtions not working

hi,

please try:

=Sum({$ <AnoAdmissao ={"$(=year(today()))"}, MesAdmissao={"$(=num(month(today())))"},

               DescricaoSituacao={Ativo}>}Qtd_colaboradores)

venanciop
New Contributor II

Re: Month and year funtions not working

Thanks

sureshqv
Esteemed Contributor III

Re: Month and year funtions not working

Please close the thread as correct.or helpful...hope this wil help to others while seaerchng

thanks

Suresh

Employee
Employee

Re: Month and year funtions not working

It is not possible to use normal functions in the position where you use them, since the parser expects a Set, i.e. either a {...} construction, or a Set function, E() or P().

See more on

A Primer on Set Analysis

Dates in Set Analysis

HIC