Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a very simple table as below. What I need is to create two columns. First show me only references with code 1, second only references with code 2.
Can you help me?
CODE | REFERENCE |
1 | 890111991 |
1 | 890144345 |
1 | 904728933 |
2 | 893723672 |
2 | 894234873 |
2 | 829347234 |
You are correct. But the logic in the app is the same. Insert a Table and add 2 dimensions (inclusive zero values):
1. dimension with formula
=if(CODE=1,REFERENCE,null())
2. dimension with formula
=if(CODE=2,REFERENCE,null())
and rename the columns.
You can also work with an variable input. Define a variable like 'vCode' and change the code for the dimension to:
=if(CODE=$(vCode),REFERENCE,null())
Now you can change the value of the variable by buttons or the 'Variable input' from the Qlik Dashboard bundle. The resulting table now shows only REFERENCE by chosen CODE.
Hi.
Are you talking in the front end app or making changes to the script?
I'm thinking about app. I expect following result. And I need simple table (not Pivot)
CODE 1 | CODE 2 |
890111991 | - |
890144345 | - |
904728933 | - |
- | 893723672 |
- | 894234873 |
- | 829347234 |
Maybe a possible solution:
[newTab]:
load
if(CODE=1,REFERENCE,null()) as Code1
,if(CODE=2,REFERENCE,null()) as Code2
resident [originalTab];
thanks but your solution is for script. I need solution in app.
You are correct. But the logic in the app is the same. Insert a Table and add 2 dimensions (inclusive zero values):
1. dimension with formula
=if(CODE=1,REFERENCE,null())
2. dimension with formula
=if(CODE=2,REFERENCE,null())
and rename the columns.
You can also work with an variable input. Define a variable like 'vCode' and change the code for the dimension to:
=if(CODE=$(vCode),REFERENCE,null())
Now you can change the value of the variable by buttons or the 'Variable input' from the Qlik Dashboard bundle. The resulting table now shows only REFERENCE by chosen CODE.
thanks!
Now I got it 🙂 works for me