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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
daviddiener
Partner - Contributor II
Partner - Contributor II

Count dimension if aggregate count passes condition

Problem:

I want to create a single KPI with the count of the dimension SDTL_REFERENZ_NR if the aggr() count of two dimensions (SSL_TEIL_ID_NO_ZZZZ, EBEF_SSL_ID) is greater than 3.

What I have:

 

count(
	if(
      	aggr(count({<
                    FALL_REFERENZNUMMER = {""},
		     >} distinct SDTL_REFERENZ_NR), SSL_TEIL_ID_NO_ZZZZ, EBEF_SSL_ID) >= 3,
        SDTL_REFERENZ_NR))

 

 

The problem is, this funtion gives me the count of aggr() groups which meet the if condition. But I want to count the number of the dimension SDTL_REFERENZ_NR which are in the aggregated group.

Example:

If I put the dimensions SSL_TEIL_ID_NO_ZZZZ and EBEF_SSL_ID in a table and add a count on SDTL_REFERENZ_NR it gives me the values I want to count in the table. This should give me "8" as the result of my KPI. My current KPI gives me "2" because there are 2 aggregated rows.

daviddiener_0-1621341481729.png

 

 

Labels (1)
0 Replies