Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

straight table - how to get rid of '-' value in my expression column?

Hi guys,

I have created a straiight table. there's value of '-' and 'NEW'. I only need to display IDs with 'NEW' value only.

So, how can i supress/get rid of the '-' value in this particular expression column?

my expression is as such:

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,'-','NEW')

pivot.jpg

1 Solution

Accepted Solutions
marcus_sommer

Try:

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,

     Null(), COUNT(DISTINCT risk_item_id))

- Marcus

View solution in original post

7 Replies
marcus_sommer

Try this:

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,Null(),'NEW')

and then suppress these NULL's within the tab presentations.

- Marcus

jim_chan
Specialist
Specialist
Author

Dear Sommer,

do you mean at the presentation tab, click on the expression , then at the bottom "tick/check" Suppress Zero Value?

Rgds,

Jim

marcus_sommer

I meant this:

- Marcus

jim_chan
Specialist
Specialist
Author

Hi Marcus,

I have chaneg the expressoin to "Null", but i am still getting the "Null" value in my straight table.

and at the presentation tab, i have already checked" suppress zer value" and changed the Null symbol too.

pivot.jpg

marcus_sommer

These approach worked only if it will be applied to all expressions. Your expression in the left column returns 1 and therefore each dimension-value had a valid expression-result and will be displayed. For your 1-expression you will need the same condition:

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,Null(),"1-expression")

- Marcus

jim_chan
Specialist
Specialist
Author

Dear Marcus,

there are 2 expressions.

1st expression is - COUNT(DISTINCT risk_item_id)

2nd one i ahev arleady changed it to

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,Null(),'NEW')


Rgds,


Jim

marcus_sommer

Try:

IF(COUNT({<Year= {'<$(=Max(Year))'}, record_id = P({<record_id>})>}record_id)>0,

     Null(), COUNT(DISTINCT risk_item_id))

- Marcus