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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
phraid
Contributor
Contributor

How to restrict dynamically the range of data displayed on x-axis?

Hi 

I have the following dataset:

phraid_0-1712589829984.png

I display the nb of sales with accumulation per DCP and it works fine:

phraid_1-1712589937229.png

Starting from that point, I want to display only the DCPs equal or superior to 2 for instance (obviously, in my real case, the limit (2 here) is more complex and is based on a computation taking into account other fields of the table that I don't show here... but let's start "simple" and it is important to notice that I cannot apply a manual filter).

I edited the expression with something like: 

Sum({$<DCP = {">= 2"}>} NbSales)

But it still displays all the DCPs, whereas I would expect to not see the DCPs 1 and 0. 

phraid_2-1712590458781.png

Any ideas would be very appreciated 😀

Regards, Fred

Labels (1)
2 Replies
mpc
Partner Ambassador
Partner Ambassador

Hi, 

I've you tried to uncheck Include 0 values the Data handling secion ? 

 

maximepiquetcointe_0-1712651686378.png

 

Regards

From Next Decision and mpc with love
marcus_sommer

If you didn't want to show all values and/or limiting them in any way you will need to apply appropriate conditions to your expression, simplified something like this:

if(Condition1, MyExpression1, if(Condition2, MyExpression2, 'myDefault'))

whereby 'myDefault' might be also NULL or ZERO or the (TOTAL) max. Value/Count of any dimension/expression.

Beside applying everything in (nested) if-loops you may also use a wrapping with range-functions like:

rangemin(MyDefault, MyExpression)