Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

daniel_freitas
New Contributor

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

Re: Count if and distinct

Something like this?

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

tajmohamed30
Contributor III

Re: Count if and distinct

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