Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count if and distinct

Dear All,

I am pretty new using set analysis and I am having some trouble while calculating an Indicator through a database on qlikview.

The base has the structure below. What I want to do is to count the number of distinct IDs which has number 1 in the column on the right ("Raw Material"). This column may be 1 or 0 in one same ID.

For instance, the calculation using the base below has to be 2.

Can someone help me?

 

ID Raw Material
11
10
11
21
21
21
30
30
2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Something like this?

=count({<[Raw Material] = {1}>} DISTINCT ID)

tajmohamed30
Creator III
Creator III

Hi Daniel,

Following steps may help;

Step1: Create listbox with field Raw material

Step2: Create listbox with field ID(in properties general tick show frequency)

Step3: Create straight table with dimension ID and expression as sum(Raw material)

Now you can select 0 or 1 in Raw material to show distinct ID values

Regards

Taj Mohamed