Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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-D1 | Column-D2 | Column-D3 | KPI1 | KPI2 | KPI3 |
ABC | ABC | ABC | 1 | 0 | 0 |
CBA | CBA | CBA | 0 | 1 | 0 |
asdasd | asdasd | asdasd | 0 | 0 | 1 |
asdasd | asdasd | asdasda | 1 | 1 | 0 |
asdasdasd | asdasda | asdasda | 0 | 1 | 1 |
asdasd | asdasd | asdasda | 1 | 1 | 1 |
should not be displayed | should not be displayed | should not be displayed | 0 | 0 | 0 |
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.
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.
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.
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.
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.
But maybe I misunderstood the task.
B.
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.
Could you attach a printscreen or source code?
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])