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,

truck trucks.png

I got this table showing me the Km's per truck per week. Now I would like it to show me only the trucks that haven't had any kilometers per week. If I now would say pick week 1 it will show me the trucks that have had kilometers that week. And when I select 10 weeks it will also show me the trucks in week 1 that had 0 kilometers.

expression:
sum(Distance)

kind regards,

Vincent

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

change your expression in:

If(sum(Distance)=0, 'Zero KM', 0)

with this expression when you have zero you set Zero Km, all others will have 0 and if you have kept default settings the checkbox exclude zero values will be cheched

hope it helps

Not applicable
Author

Hi alessandro,

This indeed gives me the trucks that had 0km's but it isnt really a pretty lay-out. And is it possible to count the number of zero km's trucks?

santharubban
Creator III
Creator III

Try this

=sum({<Distance = {0}>}Distance) in expression

or

=aggr(sum({<Distance = {0}>}Distance),fleetnumber,year) in diminsion

Not applicable
Author

Hi Vincent

as far as i can see in your exl sheet some trucks have 0 in week 1

so to see only these trucks but along all weeks you can play with background colors

if (sum(distance)>0, white())

so you'll get white/white color nothing to see, but 0

best regards

chris

Not applicable
Author

Hi try this...i hope this will help u...

Not applicable
Author

trucks2.png

alexandros17
Partner - Champion III
Partner - Champion III

could you send me your document?

Not applicable
Author

if I upload it here it would be without data i guess?

alexandros17
Partner - Champion III
Partner - Champion III

Use scramble instruction ...