Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

help me below requirement for creating selected field in script?

Hi Everyone,

I have data like

ID,Product,sales,status

1,  a,   100,   open

2,  b,   200,   open

3,  c,   300,   close

4,  d,   400,  close

5,  e,   500,   close

 

I want create one field in script level.it contains value1 and value2.

newField

value1

value2

in front end if i select value1 it display the complete data.and if i select value2 it need to be show only status open related data.

select value1 dis[ly the complete 5 records and if select value2 display 2 records.

Please help me on this.

Labels (1)
1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

I have done something similar, my structure was like below modified for your values.

 

[newField_Table]:
LOAD
ID,
Product,
'Value1' as [newField]
Resident MainData where Status = 'open';

[newField_Table]:
LOAD
ID,
Product,
'Value2' as [newField]
Resident MainData;

View solution in original post

1 Reply
tm_burgers
Creator III
Creator III

I have done something similar, my structure was like below modified for your values.

 

[newField_Table]:
LOAD
ID,
Product,
'Value1' as [newField]
Resident MainData where Status = 'open';

[newField_Table]:
LOAD
ID,
Product,
'Value2' as [newField]
Resident MainData;