Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikofba
Contributor II
Contributor II

Set analysis in Dimension or Supress null expression

I have an issue.

I have below is a list of the dimensions(name) and expressions (balance, previous year balance, and difference in balances)

Name    |        Balance      |   Balance of Last Year     |      Difference of (Balance - Balance of Last Year)

nm        |     sum(balance)  |       sum({$<dt={"$(=vPrevYear)"}>}balance)    | sum(balance) - sum({$<dt={"$(=vPrevYear)"}>}balance)

I tried creating a variable in the script but it needs to be created off current selections.

I then changed the expression to say

if((sum(balance) - sum({$<dt={"$(=vPrevYear)"}>}balance)) > 200000, sum(balance) - sum({$<dt={"$(=vPrevYear)"}>}balance))

The columns that are less than 200000 are displayed as -(I dont want them there). 

I only want to display the differences in the last column that are greater than 200,000.

Is there an easy way to do this?

25 Replies
sunny_talwar

Are those dashes in Exp3 only or do you get them from Exp2 and Exp1 on the same row?

qlikofba
Contributor II
Contributor II
Author

there are balances in exp 2 and 3, the - is just in exp 3

sunny_talwar

What are the expressions you are using? You have to force those to be null for in order to make this work. Are you not using this for Exp1 and Exp2?

Sum({<nm = {"=Sum(balance) - Sum({$<dt={'$(=vPrevYear)'}>} balance) > 200000"}>} balance)


Sum({$<dt={"$(=vPrevYear)"}, nm = {"=Sum(balance) - Sum({$<dt={'$(=vPrevYear)'}>} balance) > 200000"}>}balance)

Or go traditional if statement:

If(Sum(balance) - Sum({$<dt={"$(=vPrevYear)"}>}balance) > 200000, Sum(balance))

If(Sum(balance) - Sum({$<dt={"$(=vPrevYear)"}>}balance) > 200000, Sum({$<dt={"$(=vPrevYear)"}>}balance))

qlikofba
Contributor II
Contributor II
Author

yes those are exp 1 and exp 2.  The values still arent showing up as null.

sunny_talwar

You mentioned a change that you made to Exp3, what was the change? You need to make the same change for exp1 and exp2. The basic idea is this

If(Exp3 > 200,000, Exp1)

If(Exp3 > 200,000, Exp2)

If(Exp3 > 200,000, Exp3)

qlikofba
Contributor II
Contributor II
Author

Thank you that finally solved it. I appropriate the help.