Qlik Community

New to Qlik Sense

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

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
venanciop
Contributor II
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?

7 Replies
maxgro
MVP
MVP

sum({$ <

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

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

     DescricaoSituacao={Ativo}>

     }

     Qtd_colaboradores)

nizamsha
Specialist II
Specialist II

=Sum({<AnoAdmissao =

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

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

DescricaoSituacao = {"Ativo"}>}Qtd_colaboradores)

amithmurali
Partner
Partner

sum({$ <

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

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

              DescricaoSituacao ={Ativo}

         >} Qtd_colaboradores)

neetha_p
Master
Master

hi,

please try:

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

               DescricaoSituacao={Ativo}>}Qtd_colaboradores)

venanciop
Contributor II
Contributor II
Author

Thanks

Chanty4u
MVP
MVP

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

thanks

Suresh

Henric_Cronström

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