Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik Sense Function

I am working on a function which calculates the total unique count of account_numbers, by attribute and date.

This total must remain consistent when applying a dashboard selection/filter on year and attribute.

I've tried using the {1} parameter to ignore selection/filters, but it's not working as expected.

I've tried:

COUNT( {1} TOTAL <date> DISTINCT account_number)

I've also tried:

COUNT( {1} TOTAL <attribute, date> DISTINCT account_number)

The {1} disregards the attribute and date parameters within <> and does a total count of distinct account_numbers.

Does anyone know how I can get a static total distinct count of account_number, by attribute and date?

Thanks!

2 Replies
Lisa_P
Employee
Employee

How are you trying to show this Count ?

The combination of {1} and TOTAL can also be achieved with the ALL qualifier.  If you need to show dimensionality in a table or chart, then just use the {1} to ignore selections only.

Also the syntax should be:

COUNT( {1}  DISTINCT account_number) or COUNT( ALL account_number)

If you want to only ignore selections on attribute and date, you can remove them from selections:

COUNT({$<attribute=, date=, year=>}DISTINCT account_number)

tomasz_tru
Specialist
Specialist

It is not recommended to use ALL qualifier in QS:

ALL qualifier

In QlikView, the ALL qualifier may occur before an expression. This is equivalent to using {1} TOTAL. In such a case the calculation will be made over all the values of the field in the document, disregarding the chart dimensions and current selections. The same value is always returned regardless of the logical state in the document. If the ALL qualifier is used, a set expression cannot be used, since the ALL qualifier defines a set by itself. For legacy reasons, the ALL qualifier will still work in this version of Qlik Sense, but may be removed in coming versions.

(https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/functions-statements-not...)