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

Show clients with more than 5 houses

Hi


I need to show the clients that have more than 5 houses in a table.


In my data I have 2000 clients but only 22 have more than 5 houses, those 22 I need to show in a table.

In the dimension I have the following expression


=if( aggr((count(NAME_CLIENT)),NAME_CLIENT)>5, NAME_CLIENT,)

Expression measure

=Sum(Aggr(if(count(NAME_CLIENT) > 5, 1, 0), NAME_CLIENT))

consulta.png

1 Solution

Accepted Solutions
sunny_talwar

May be this

Count({<NAME_CLIENT = {"=Count(NAME_CLIENT) > 5"}>}  NAME_CLIENT)

View solution in original post

6 Replies
Anil_Babu_Samineni

If you already restrict in dimension, Why you are trying same in expression? Try this using same dimension as yours

=Sum(NAME_CLIENT)


Or

Sum(Aggr(If(Match(Count({<NAME_CLIENT = {"=Count(NAME_CLIENT)>5"}>} NAME_CLIENT),1),NAME_CLIENT),NAME_CLIENT))


My Bad, This?

=Sum(Aggr(if(count(NAME_CLIENT) > 5, 1), NAME_CLIENT))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sibin_jacob
Creator III
Creator III

If you want to suppress the zero values,

Go to table -> Add-ons Properties -> uncheck Include zero values.

It will eliminate Zero rows in the table.

sunny_talwar

Why don't you try this

Dimension

NAME_CLIENT

Expression

Count(DISTINCT {<NAME_CLIENT = {"=Count(NAME_CLIENT) > 5"}>}  NAME_CLIENT)

and now uncheck 'Include Zero Values' under Add-Ons -> Data Handling

MarioCenteno
Creator III
Creator III
Author

Now it shows me the 22 clients but it does not group how many houses each client has. How do I do that?


client.png

sunny_talwar

May be this

Count({<NAME_CLIENT = {"=Count(NAME_CLIENT) > 5"}>}  NAME_CLIENT)

MarioCenteno
Creator III
Creator III
Author

Thanks Sunny.