Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Load data contains the specific value with ID

We required IDs data contains 'Test3', Please refer the sample screenshot below.

compare.JPG

LOAD * INLINE [
ID, Name, Category
1, dsfdsgdfg, Test1
1, dsfdsgdfg, Test2
1, dsfdsgdfg, Test3
1, dsfdsgdfg, Test4
2, bffgtr, Test1
2, bffgtr, Test2
3, gfhtrhtr, Test2
3, gfhtrhtr, Test3
3, gfhtrhtr, Test4
4, nghntnry45, Test2
5, gfngfbw56, Test1
5, gfngfbw56, Test2
5, gfngfbw56, Test3
5, gfngfbw56, Test4
6, jkmtyerea, Test2
6, jkmtyerea, Test3
7, hgjtyurty, Test1
7, hgjtyurty, Test2
7, hgjtyurty, Test4
8, kjljtytr, Test1
8, kjljtytr, Test2
8, kjljtytr, Test4
9, yutrytry, Test3
];

5 Replies
Highlighted
Partner
Partner

Test3IDs:
Load ID as Test3ID from source where category = 'Test 3';

Final:
Load ID, Name, Category
From source
where exists(Test3ID, ID);
Drop table Test3IDs;
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Creator II
Creator II

Thanks for the response, but I need output exactly like above screenshot, as I'm getting only Test3 data
Highlighted
Partner
Partner

If you follow vegar's method your datamodel will contain only what you desire as output .
please specify if you want the output only on the UI or the full datamodel.
latter is vegars approach.
if you want the former you can modify vegars code and add a flag on all the ids which has Test3

Highlighted
Creator II
Creator II

I need output only on the UI, I mean Pivot table
Highlighted
Partner
Partner

2 options
1- try something like below to creata a flag and use set analysis like Test3Flag={'Y'} in your pivot table
Test3IDs:
Load ID, 'Y' as Test3Flag from source where category = 'Test 3';
2- Option 2 pure set analysis something like below
Sum( {<
ID=p( {<Category={'Test3'}>}ID)
>}
YourMeasure)