Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
new_guy
Contributor III
Contributor III

Show rows conditional

Hello, 

I have a table with 3 dimensions and 3 KPIs. I want to show rows only if at least one of the KPI is not zero. Any suggestions how to solve this? I cant change anything within the loading skript, so this is not an option.

 

To make it a little bit more clear, I've tried to show you the possible combinations when a row shoud be shown and when not. 

 

Thanks in advance. 

 

 

Column-D1Column-D2Column-D3KPI1KPI2KPI3
ABCABCABC100
CBACBACBA010
asdasdasdasdasdasd001
asdasdasdasdasdasda110
asdasdasdasdasdaasdasda011
asdasdasdasdasdasda111
should not be displayedshould not be displayedshould not be displayed000
      
8 Replies
qlikerB96
Contributor III
Contributor III

Hi,

I am not sure of understanding your purpose and where do you want to solve that.

If you do not want to load the rows where all the KPI's are 0 you should use a where clause in the load station.

newTable:

Load

Column-D1,

Column-D2,

Column-D3,

KPI1,

KPI2,

KPI3

Resident table

Where (KPI1 > 0 or KPI2 > 0 or KPI3 > 0);

 

Good luck,

B.

new_guy
Contributor III
Contributor III
Author

In general, this would be the way I would do it. But as I said, i cant change the load-skript that I use right now. So my solution needs to be on a worksheet level. 

qlikerB96
Contributor III
Contributor III

Oh, I see.

So in this case you shold use an IF clause in the Table chart when you add the dimension.  The same check as in the load script: IF(dim1 >0 or dim2 >0 or dim3>0, dim1) and the same for the other dimensions.

And after that you should uncheck the checkbox of 'Include null values'

 

B.

Anil_Babu_Samineni

@qlikerB96 

I would think rather "and" logical operator 

IF(KPI1 >0 and KPI2 >0 and KPI3 >0, <Your First Dimension>)

IF(KPI1 >0 and KPI2 >0 and KPI3 >0, <Your Second Dimension>)

IF(KPI1 >0 and KPI2 >0 and KPI3 >0, <Your Third Dimension>) etc.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikerB96
Contributor III
Contributor III

Hi,

If he wants to show a cloumn if at least one KPI is not 0 he has to use the 'or ' operator .

In case of using 'and' all the KPI's must be grater than 0.

 

AND-Logic-Gate-and-OR-Logic-Gate.png

 

But maybe I misunderstood the task.

B.

new_guy
Contributor III
Contributor III
Author

ok, so we had similar ideas.

 

I've also tried a statement like "if(KPI1>0,Dim1)" when I add a dimension. The problem is that Qlik is gives me an error when I do it like this. Its an invalid dimension. 

qlikerB96
Contributor III
Contributor III

Could you attach a printscreen or source code?

Anil_Babu_Samineni

@new_guy 

Dim1 is many not be exactly the dimension what you have in your model. Check the Dimension properly how it looks? By seeing you image it should be

if(KPI1>0,[Column-D1])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful