Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

How to eliminate zero in the Graph

Hollo Everybody,  I am using QlikSense Desktop version and i am facing a problem while developing an APP.. I would like to omit zero part of the graph to have a better  view and to see the min values and the avg values correctly, i do not want to insert a condition in the SQL part, and i did check the option "remove zero or remove null value " on the properties part, it worked for the graph only , not for the MIn and AVG,
is there any way to remove the zeros and see the effect in the graph as well as in the labels MIN and AVG ?

P:S.. you can see the scripting or the fileds assigned for each part on the picture in red colour

2018-05-17_10h42_26.jpg

16 Replies
Highlighted
Champion
Champion

can you confirm that you're talking about the min and the avg of the text objects on the right ?

also, maybe I was wrong talking about aggregation..

on your graphic, I can see that the min value you're trying to get is approximatively: 6.42M

try this for the min:

=min({<DATE={"=len(trim(DATE))<>0"}>}Quantity)

Highlighted
Creator
Creator

yes! then min value of the right-side graph, and how about the average? the same way? "

Highlighted
Champion
Champion

Yes, the same way, but on average since you have sum/count

Put the same set analysis inside the sum AND inside the count

Highlighted
Creator
Creator

bro , this formula i guess show the min of a values of  one product, since in the graph i summed all the quantity per product , so the minimum  summation!
just to make sure if this formula is applied for the minimum sum or no ?
min({<DATE={"=len(trim(DATE))<>0"}>}Quantity)

Highlighted
Champion
Champion

There is only DATE dimension on your line graphic, so the value you're trying to get "6.42M" is not a value of ONE product, but it is the minimum value of all the product on that date.


you can aggregate by product, maybe you will have different result, maybe not:


=min(aggr(sum({<DATE={"=len(trim(DATE))<>0"}>}Quantity),DATE))

Highlighted
Creator
Creator

no luck bro .. Thank you  for your help ,
do you have any idea of how to omit those zero at the begining? with scripting ? like

DATE > "01/01/2018" shoude work ?

Highlighted
Champion
Champion

the best proven solution to remove all types of BLANK/NULL etc is len(trim())

it works on the front-end using a set analysis or IF statement

it also works on the back-end using IF statement on creating the field