Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
ebrahimaljefri
New Contributor III

Assistance please

HI QLIKERS

Actually i am running below code in Visualization expression to count OpportunityName for current year only but it counts for whole years which mean it does not consider giving parameters exist  

count({$<2017={'01/01/2017'}>} OpportunityName)

please help

9 Replies
Employee
Employee

Re: Assistance please

do you have a field called "2017"?

ebrahimaljefri
New Contributor III

Re: Assistance please

No it is not , i have made a culomn in script using makedate(year(today())) as currentyear and i replaced with 2017 but its still count whole years since 2013 until now !

Employee
Employee

Re: Assistance please

count({$<[youshouldhaveafieldnamehere]={'01/01/2017'}>}


Useful reading: A Primer on Set Analysis

ebrahimaljefri
New Contributor III

Re: Assistance please

Thank you for provided link but it is not working even when put currentyear field

phaneendra_kunc
Valued Contributor III

Re: Assistance please

count({$<CurrentYearField={'2017'}>} OpportunityName)


Try this..


Hoping CurrentYearField will have

2017

2016

2015...

ebrahimaljefri
New Contributor III

Re: Assistance please

Actually i have created "current year" using function as below

Makedate(year(today())) which must take only current year but still when i run aggr it returns the whole years counts but i want it to return count for current year

phaneendra_kunc
Valued Contributor III

Re: Assistance please

Can you take out MAKEDATE and just do below for CurrentYear Field?

Year(today()) as [current year]

ebrahimaljefri
New Contributor III

Re: Assistance please

Yes but  sadly still its not working

eduardo_dimperi
Valued Contributor II

Re: Assistance please

HI Ibrahibra,

When you create the field using Year(today()) as [current year] like phaneendra.kunche said, what's the result?

Cause when you said "not working" we don't know if it return nothing or a wrong value

Community Browser