Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pradnyat
Creator
Creator

Ignore Null values from Total function

Hi All,

I have 1 straight table with below dimensions and Expressions:

Plan ,Sales and Total Sales.

The issue is there is Sales for some Null(-) Plans. So when I am using total function in Total Sales, then its including the sales for null plans also,even after selecting Suppress Null Values for Plan dimension.

Is there any way to ignore the sales for null plans from Total function.

Thanks in Advance.... !

3 Replies
JonnyPoole
Employee
Employee

The suppress nulls works on the aggregated values , not the detail records. 

A common technique is to use and IF statement on all expressions:

sum ( If  (  not isnull(Plan) , Sales)  )

sum ( If  (  not isnull(Plan) , [Total Sales])  )

Then the Sales and Total Sales will be null when the Plan is Null and the row will be suppressed from the chart.

Vegar
MVP
MVP

A set expression should also work.

sum (  {<Plain ={"*"}>}Sales) 

sunny_talwar

Please see the attached qvw file. Is this what you were trying to do?

Best,

S