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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Null() in Calculated Dimension

So I have a table where I want to hid any rows that have no value for a specific expression regardless if there is any data in the other expression fields.  See below for example of my table.  What I am trying to do is write a calculated dimension for "RVP" that would allow me to suppress the null values.  I am using the following but get and Error in Calculated Dimension.

if( (COGS/REVENUE) =0, NULL(), [RVP])

I would then supress the null values ideally eliminating RVPs "G" and "H" from the table.

  

DimensionDimensionExpressionExpressionExpression
RVPRegionRevenueCOGSCOGS % Rev
A1 $ 10,000 $ 5,000 50%
B2 $ 20,000 $ 6,000 30%
C3 $ 30,000 $ 7,000 23%
D4 $ 40,000 $ 8,000 20%
E5 $ 50,000 $ 9,000 18%
F6 $ 60,000 $ 10,000 17%
G7 $                 -   $                 -  
H8 $                 -   $                 -  

Thanks in advance

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

May be try using the aggregate function

Aggr(If(Expression4Revenue = 0 or Expression4COGS = 0, Null(), RVP), RVP, Region)