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: 
CasperQlik
Creator
Creator

Hide values with 3 or less occurences

Hi Qlik Community

I have a pivot table with data across years. The data entries are calculated with a simple count() function across 2 dimensions.

I need to hide values in the pivot table when there are 3 or less occurrences (counts). 
The value still needs to be counted in the total sum of values at the top but in the single cell there should be an indication that the value is missing because there are 3 or less occurrences.

Any help is appreciated.

1 Solution

Accepted Solutions
LRuCelver
Partner - Creator III
Partner - Creator III

Like this?

LRuCelver_0-1711033899796.png

All values in a dimension with a count of <= 3 are grouped as 'Excluded'. That means that the count for Excluded can exceed 3 if more than one value of a dimension is excluded. The excluded values can still be filtered for by selecting excluded.

Here are the expressions used (in Dim1, Dim2 order):

=Aggr(If(Count(Val) > 3, Dim1, 'Excluded'), Dim1)
=Aggr(If(Count(Val) > 3, Dim2, 'Excluded'), Dim1, Dim2)

And here is the data I used:

Data:
NoConcatenate Load * Inline [
Dim1, Dim2, Val
A, a, 1
A, a, 2
A, a, 3
A, a, 4
A, b, 1
A, b, 2
B, a, 1
B, a, 2
B, a, 3
B, a, 4
B, b, 1
B, b, 2
B, b, 3
B, b, 4
C, a, 1
C, a, 2
];

 

View solution in original post

1 Reply
LRuCelver
Partner - Creator III
Partner - Creator III

Like this?

LRuCelver_0-1711033899796.png

All values in a dimension with a count of <= 3 are grouped as 'Excluded'. That means that the count for Excluded can exceed 3 if more than one value of a dimension is excluded. The excluded values can still be filtered for by selecting excluded.

Here are the expressions used (in Dim1, Dim2 order):

=Aggr(If(Count(Val) > 3, Dim1, 'Excluded'), Dim1)
=Aggr(If(Count(Val) > 3, Dim2, 'Excluded'), Dim1, Dim2)

And here is the data I used:

Data:
NoConcatenate Load * Inline [
Dim1, Dim2, Val
A, a, 1
A, a, 2
A, a, 3
A, a, 4
A, b, 1
A, b, 2
B, a, 1
B, a, 2
B, a, 3
B, a, 4
B, b, 1
B, b, 2
B, b, 3
B, b, 4
C, a, 1
C, a, 2
];