Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to limit the rows displayed in a pivot table

I have a pivot table that shows customer number, customer name and number of distinct customers.  I only want to show the rows where the number of distinct customers is greater than 1.  See attached qlikview file.

How can I only show the rows where the Nbr of Customers is > 1 ?

Thanks.

Ed

1 Solution

Accepted Solutions
Not applicable
Author

Hi Ed,

Can just use

IF(COUNT(DISTINCT(Cust_Name))>1,
COUNT(DISTINCT(Cust_Name)))

In your expression

hope that helps

Joe

View solution in original post

8 Replies
Not applicable
Author

Hi Ed,

Can just use

IF(COUNT(DISTINCT(Cust_Name))>1,
COUNT(DISTINCT(Cust_Name)))

In your expression

hope that helps

Joe

Anonymous
Not applicable
Author

Joe,

That was too simple.  Thanks for the help.

Ed

Anonymous
Not applicable
Author

Hi

As you are using Cust_Name in dimension once expand the customer nmbr ..above solution will not work .

you need to use below expression

if(aggr(COUNT(DISTINCT(Cust_Name)),Cust_nbr)>1,COUNT(DISTINCT(Cust_Name)))

PFA

Anonymous
Not applicable
Author

Joe ,

Can you attach the application if it is working as expected.

Not applicable
Author

Good point, I didn't spot the extra dimension in there, you're right mine wouldn't work with that in there

Joe

Anonymous
Not applicable
Author

Your right, Joe's answer does not work.  Unfortunately neither does yours.  Yes it displays the number counts if the total is > 1 BUT if you expand the pivot table you only see 1 Cust_Name value of A (you should see A,B and C)

Not applicable
Author

Just change it to

If(aggr(NODISTINCT COUNT(DISTINCT(Cust_Name)),Cust_nbr)>1,COUNT(DISTINCT(Cust_Name)))


you need the nodistinct in the aggr function to ensure you get all three rows

hope that helps

Joe

Anonymous
Not applicable
Author

THAT WORKS!

Thanks ,

Ed