Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
comeonqlikview
Contributor II
Contributor II

How to write IF condition or Pick Match or any other way to write condition to get desired output in Qliksense Script Part

Hi Experts,

I have a like below  and i want to get the out put also like below in Qlik Scripting part not in the frontend.

When i write the nested IF condition it is ready only Columns1 data(0,1) since the data is same in Column2 it is working like one to one relation and not passing to second condition.

Column1 Column2 Column3 Column4 Column5
1 0 1 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 0 0
0 1 0 1 0
1 0

 

0

1 0
1 0 1 1 1
1 0 0 0 0
  1 0 1  
1 0   1 0
1   1 1 1
1 0 0   0

 

Output:-

If(Column1=0 OR Column1=1,'Column1Data',

IF(Column2=0 OR Column2=1,'Column2Data',

IF(Column3=1 OR Column3=0,'Column3Data',

IF(Column4=0 OR Column4=1,'Column4Data',

IF(Column5=0 OR Column5=1,'Column5Data'))))) AS AllColumns_Data

 

in the front end filterpane should show the data in below format and when i select coulmn1Data from AllColumns_Data it should only "Column1" Data ,similarly when i select coulmn2Data from AllColumns_Data it should only "Column2" Data

AllColumns_Data
Column1Data
Column2Data
Column3Data
Column4Data
Column5Data

 

Please help me on this requirement.

@sunny_talwar @Kushal_Chawda @Marcus_sommer@tresesco@jaganmohanrao

Labels (1)
8 Replies
comeonqlikview
Contributor II
Contributor II
Author

Can anyone help me on this please?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm confused. 

If(Column1=0 OR Column1=1,'Column1Data',

will always be true, so you will only get 'Column1Data' for AllColumns_Data.

Is your requirement that when you select "ColumnNData" from the listbox you select rows where ColumnN = 1?

-Rob

comeonqlikview
Contributor II
Contributor II
Author

Hi Rob, 

Thanks for your response. 

My output would be when I select "Column1Data" from Allcolumns_Data listbox it should heighlight  0,1 only from Column1. 

And same when I select Column2Data from Allcolumns_Data it should heighlight 0,1 from Column2   but it is heighlighting from Column1 and Column2. 

I want to show whatever I select it should only those selection data. 

comeonqlikview
Contributor II
Contributor II
Author

Yes you are true, 

I am getting Column1Data form Allcolumns_Data but i need only when I select Column1Data it should show only Column1Data(0,1), same way when i select Column2Data it should should show column2 data(0, 1).

Inside the all columns data is same but should behave like each condition data is seperate 

@rwunderlich 

comeonqlikview
Contributor II
Contributor II
Author

Hi All, 

 

Can anyone help me on above requirement? 

 

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm sorry, I'm still not understanding the requirement. What do you mean by "highlight"? Can you perhaps attach a picture of your expected output?

-Rob

comeonqlikview
Contributor II
Contributor II
Author

Hi @rwunderlich 

I attched my qvw file and attached desired out image added my commentrs  inside file in script part.

I hope it will help you afte lloking to my comments and image.

 

comeonqlikview
Contributor II
Contributor II
Author

Hi @rwunderlich 

 

If you are able to help me to build front table Pick match condition logic in Backend script part that would be fine for me now.

Please find my attached update Qvw file.