Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joe_nguyen
Partner - Contributor II
Partner - Contributor II

How do I hide rows when Null value exist?

What setting in the document allows me to dynamically hide rows in a table where one of the cell values = null?

Thanks,

Joe

5 Replies
johnw
Champion III
Champion III

If you mean a DIMENSION cell value, Properties -> Dimensions -> select the dimension -> Suppress When Value Is Null.

If you mean an EXPRESSION cell value, and there's only one expression, Properties -> Presentation -> Suppress Zero-Values.

If you mean an EXPRESSION cell value, and there is more than one expression, and you want to hide the row if ANY of the expressions are null, that's when things get complicated. But I won't try to answer that unless that's what you meant.

joe_nguyen
Partner - Contributor II
Partner - Contributor II
Author

It's the third, most complicated one.

Thanks,

Joe

johnw
Champion III
Champion III

Ah, OK. Well, then let's say your table is currently this:

Dimension = Customer
Expression 1 = sum(Amount)
Expresison 2 = avg(Quantity)

This is one way to make them both disappear if either is null (untested):

Dimension = Customer
Expression 1 = if(len(sum(Amount)) and len(avg(Quantity)),sum(Amount))
Expression 2 = if(len(sum(Amount)) and len(avg(Quantity)),avg(Quantity))

And here's another way (also untested):

Dimension = aggr(if(len(sum(Amount)) and len(sum(Quantity)),Customer),Customer)
Expression 1 = sum(Amount)
Expresison 2 = avg(Quantity)

joe_nguyen
Partner - Contributor II
Partner - Contributor II
Author

John, thanks for the excellent suggestion. However, I found out that one of my expressions is using Rank, so it looks like the setting to hide 0 / null is being disregarded by QV.

Any other suggestion?

manisha10
Contributor III
Contributor III

Hi John,

This expression is not working for me! 

ABActualTargetDifferenceMaxValue
CommercialUnsecured201199
ConsumerSecured11110-
ConsumerUnsecured511-6-
CommercialSecured411-7-

 

Dimensions: A,B,Actual, Target 

Measure:  MaxValue = if(fabs(Actual-Target)=max(Total(fabs(Actual-Target))),fabs(Actual-Target),null())

Expressions used for Dimensions is like this: 

= aggr(if(len([MaxValue]),A),A)

It is showing error.

Error: 

ABActualTargetDifferenceMaxValue
-Unsecured201199
-Secured11110-
-Unsecured511-6-
-Secured411-7-