Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

qvhjenvo
New Contributor

what is different between getpossiblecount and count functions

Hi,

Somebody can tell What is different between getpossiblecount() and Count() functions?

Regards

Loi

3 Replies
israrkhan
Valued Contributor II

Re: what is different between getpossiblecount and count functions

Hi,

Count is normal aggr function, where you can count ant field, like

Count(EmployeeId) it will give you number of employees.

where getpossiblecount() works with selection, when you select a field, you see possible values for that field,

let say you select Department in list box, and on selection of Department you can see how many employees are in selected department, so you can use getpossiblecount() for the counting purpose. it will give you all employee for that selected department.

Hope it helps...

Not applicable

Re: what is different between getpossiblecount and count functions

Hi Loi,

GetPossibleCount works more like a distinct count. It gets the count of possible values of the field.

check the attached QVW for an example.

Employee
Employee

Re: what is different between getpossiblecount and count functions

GetPossibleCount() is exactly the same as Count(distinct total ...). Note the total qualifier - this means that the function isn't sensitive to the dimensional scope. See more on http://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope

The GetPossibleCount exists as a "sister" function to GetSelectedCount and GetExcludedCount.

HIC

Community Browser