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

table to show only data with positive sales within 6 months

hello community,

I have table with business name( customer) and units 

wanna show only active customers with sales above 0 within 6 months

I tried this , as long as 6 month sum larger than 0, show its all sales units.

=if(sum({<DateFieldMonthYear={"Jan-21","Feb-21","Mar-21","Apr-21","May-21","Jun-21"}>}[Pack Units])>0,
sum([Pack Units]))

but it returns me very funky result.

coloful_architect_0-1634920451650.png

I decompose the formula to see if something wrong with that major set expression filtered with month, it looks good

coloful_architect_1-1634920674190.png

Need your help thanks.

 

much appreciated If you could list two ways for dimension and measurement 

 

 

1 Solution

Accepted Solutions
Or
MVP
MVP

Enable the suppress zero/null option on your table, and then use whatever formula you normally would to get the sales contained within a RangeMax() function, e.g.

RangeMax(0,Sum(Sales))

This will result in all negative / null values being set to 0, and thus being suppressed.

View solution in original post

3 Replies
Or
MVP
MVP

Enable the suppress zero/null option on your table, and then use whatever formula you normally would to get the sales contained within a RangeMax() function, e.g.

RangeMax(0,Sum(Sales))

This will result in all negative / null values being set to 0, and thus being suppressed.

coloful_architect
Creator II
Creator II
Author

coloful_architect_0-1634926001098.png

now everything becomes 0....see my formula
=rangemax(0,if(Sum({<DateFieldMonthYear={"Jan-21","Feb-21","Mar-21","Apr-21","May-21","Jun-21"}>}[Pack Units])>0,
sum([Pack Units])))

would that be something to do with ">0" ....? so confused .

 

 

coloful_architect
Creator II
Creator II
Author

so  I then realize I accidentally set up that limitation to a %  value which return all those funky result.

 

To appreciate your support and intention to help me, I would love to give you the solution.

 

For whoever read this post, just FYI. the formula list below actually works !

if(sum({<DateFieldMonthYear={"Jan-21","Feb-21","Mar-21","Apr-21","May-21","Jun-21"}>}[Pack Units])>0,
sum([Pack Units]))