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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shaan007
Partner - Creator
Partner - Creator

Distinct Count set Analysis ignore any selections

Hi,

I have an admission data model with many tables.

When I calculate a KPI (in text Object)

=count(PK_ADMISSION) returns 17,564 which is correct PK_ADMISSION  has one to many links in the data model

=count(DISTINCT PK_ADMISSION) im getting a value 35,747 which is correct

=count({1} DISTINCT PK_ADMISSION) returns 35,747

how do i Count Distinct value of a selected Field (Hospital) while ignore all other selections?

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

=count({1} DISTINCT PK_ADMISSION) should be correct

Would you mind sharing your app? Preparing examples for Upload - Reduction and Data Scrambling


View solution in original post

3 Replies
Clever_Anjos
Employee
Employee

=count({1} DISTINCT PK_ADMISSION) should be correct

Would you mind sharing your app? Preparing examples for Upload - Reduction and Data Scrambling


Clever_Anjos
Employee
Employee

A "brute force" approach is creating an Alternate State and putting that text box in that state with =count(DISTINCT PK_ADMISSION)  as expression

shaan007
Partner - Creator
Partner - Creator
Author

=count({1<[Hospital Desc] =$::[Hospital ]>} DISTINCT PK_ADMISSION)