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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Matrix Show all Values(x,y axes) but hide null

Dear Community,

i need to build a matrix with A and B axes.

All the time all possible values of A and B should be visible, so the matrix should be fully expanded.

For such a model i use a pivot with two dimensions A&B and an expression with simple 'x'.

The dimensions A and B have simple inline data 1,2,3,4,5 and i checked "show all values" for them.

Also there is data for A and B combinations but not for all possible combinations.

m1.png

=> The Problem is that also null values of A & B are displayed

If i check "Suppress When Value is Null" for the dimensions, i lose the benefit of "show all values"  as for these dimensions

combination where we dont have data, the dimension value is not displayed.

m2.png

so how can i make it pssible to have all possible dimensions without NULL inside the matrix

with data that is not for all combinations of A&B present.



Best regards!


1 Solution

Accepted Solutions
sunny_talwar

Try this out:

=If(Len(Trim(B)) > 0, If(COUNT(X) = 0, '-', Count(X)))


Capture.PNG

View solution in original post

11 Replies
sunny_talwar

Would you be able to share the sample you are working with above?

Anonymous
Not applicable
Author

Hi Sunny, i have added a sample script.

I appreciate your help

Chanty4u
MVP
MVP

is this

Anonymous
Not applicable
Author

Hi Chanty, this is not correct as the Dimension A loses the value 5!

sunny_talwar

Try the attached

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny,

'x' was just an example try now the values X

So using your expression =If(Len(Trim(B)) > 0, X)  you will see it's not working as the matrix does not show all dimensions as there are not for all combination values available.



sunny_talwar

Try this expression in that case:

=If(Len(Trim(B)) > 0, If(Len(Trim(X)) > 0, X, ' '))


Capture.PNG

Anonymous
Not applicable
Author

Thanks Sunny,

this goes into the right direction but still nneds some improvement:

There are some values missing inside the matrix for example there are multiple values for A=2 & B=2

So we use a count(X) but then we still need to hide the columns where the dimension is null

Check the file & thanks for your support!

sunny_talwar

Try this out:

=If(Len(Trim(B)) > 0, If(COUNT(X) = 0, '-', Count(X)))


Capture.PNG