Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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 - Specialist
Partner - Specialist

Hi, 

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

 

maximepiquetcointe_0-1712651686378.png

 

Regards

From Next Decision and me with love
This answer help you ? Like it ! Problem solved ? Mark it !
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)