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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression

Hi all

I got this table:

123.png

Now I got a problem. Got 2 expressions first 1 for the total km, second one for km outside.

However in my second expression there is no data for vehiclecategory B but it keeps filling it with 0's. Is it possible to solve this?

Do I need to start looking my excel? Script?

kind regards

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

If you don't want 0 as value (if you have yet tried with missing and null value settings) you may write:

if(myexpression=0,'Not Available', myexpression)

Anonymous
Not applicable
Author

Try this:

=if(b='NULL' or IsNull(b) or b = 0,'', b)

Regards
Stefan

Not applicable
Author

with your expression it comes up like this

if(Km_Outside=0,'Not Available', Km_Outside)

2.png

Anonymous
Not applicable
Author

=if(b='NULL' or IsNull(b) or b = '-' or b = 0,'', b)

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming that b is a field and a dimension, I think that if b has values with some combination of the other dimensions (eg in Total KM in your example), you will be unable to suppress the display for combinations that contain no values (eg KM Outside)

All I can suggest is that you change what's displayed for the null and/or missing value on Properties | Presentation (eg a space, so nothing is displayed). But the column will remain.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

that was exactly what I was thinking. But I really hoped there was a solution.

jonathandienst
Partner - Champion III
Partner - Champion III

You may be able to do something with a calculated dimension, which return null for the 'empty' combinations, but its likely to be quite complex as it will need to Sum(Aggr(...)) the expressions you want to test.

If you post your expression and the existing dimensions, I could give it a try, if you need some help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

like this?:

=if(Production.VehicleCategory = 'B'='NULL' or IsNull(Production.VehicleCategory = 'B') or Production.VehicleCategory = 'B' = '-' or Production.VehicleCategory = 'B' = 0,'', Production.VehicleCategory = 'B')

Not applicable
Author

hi Jonathan,

That would be really kind of you!


Dimensions:

DivisionName

Week

Vehiclecategory

Expressions:

sum(total_KM)

sum(total_outside)