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: 
Zeta
Contributor III
Contributor III

Show only table rows where measure condition is met

Given a table with 2 columns and 3 rows. The first column shows the “Name” dimension. The first person is called "A", the second person is called "B" and the third person is called "C". The second column shows a KPI called "Sales", which is coded with the formula "Sum(Sales)". Person A has 500€, person B has 200€ and person C has 0€.

Name   | Sum(sales)
A             | 500€
B            | 200€
C            | 0€

Now only rows should be displayed where the condition Sum(sales) > 0 applies. If the condition does not apply, the entire line should not be displayed.

How do you do that?

In this case only a table with two rows is needed:

Name   | Sum(sales)
A             | 500€
B            | 200€

Labels (3)
3 Solutions

Accepted Solutions
Or
MVP
MVP

It is indeed under add-ons, and you would use the formula in your measure. If you have additional measures, you will need to modify them all with the if() condition suggested by @anat  to make sure they all zero out for lines you want to hide.

View solution in original post

anat
Master
Master

Working with add-ons

Straight tables have the following options under Add-ons in the properties panel:

Data handling

  • Include zero values: When unselected, measures that have the value ‘0’ are not included in the presentation. If there is more than one measure value, all the measure values must have the value ‘0’ to be excluded from the presentation.

View solution in original post

Alexan02
Partner - Contributor III
Partner - Contributor III

Hola @Zeta,

He realizado el ejercicio y he representado una dimensión de Nombre y una medida de Sum(Ventas) y he visto que basta con deshabilitar el botón 'Incluir valores cero':

Alexan02_0-1700574929944.png

Deshabilitando el botón:

Alexan02_1-1700574958600.png

Prueba a ver si te funciona.

Gracias, un saludo.

View solution in original post

8 Replies
Or
MVP
MVP

Uncheck Show zero / null and then use a formula along the lines of RangeMax(Sum(Sales),0)

anat
Master
Master

either you can suppress zero values or in measure use if(Sum(sales)>0,Sum(sales))

Zeta
Contributor III
Contributor III
Author

Thanks for your answer.

Where do I have to uncheck zero/null and use the formula along the lines?

This doesn't work under "Add-ons" of the table diagram.

Or
MVP
MVP

It is indeed under add-ons, and you would use the formula in your measure. If you have additional measures, you will need to modify them all with the if() condition suggested by @anat  to make sure they all zero out for lines you want to hide.

anat
Master
Master

Working with add-ons

Straight tables have the following options under Add-ons in the properties panel:

Data handling

  • Include zero values: When unselected, measures that have the value ‘0’ are not included in the presentation. If there is more than one measure value, all the measure values must have the value ‘0’ to be excluded from the presentation.
Zeta
Contributor III
Contributor III
Author

You can only exclude zero values in dimensions, not in KPIs.
If I use if(Sum(sales)>0,Sum(sales)) the value for person C is not calculated but the row remains.

Alexan02
Partner - Contributor III
Partner - Contributor III

Hola @Zeta,

He realizado el ejercicio y he representado una dimensión de Nombre y una medida de Sum(Ventas) y he visto que basta con deshabilitar el botón 'Incluir valores cero':

Alexan02_0-1700574929944.png

Deshabilitando el botón:

Alexan02_1-1700574958600.png

Prueba a ver si te funciona.

Gracias, un saludo.

Zeta
Contributor III
Contributor III
Author

Genial, funciona. Ahora estoy probando una tabla con más columnas (más KPI)

Salodos