Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
bharath28
Creator
Creator

replace expression

Hi Experts,

Instead of writing the if() condition in the front end, I want to write a sql statement in qlikview script to fetch the "fielda" with right data and use it directly in front end.

if(count(fielda)>1 ,minString({<type={'isp'}>}fielda), if(count (fielda)=1, minString(fielda), 'N'))

The expression counts the fielda values, if it has greater than 1 value then it pulls only values where type=isp,

if fielda has only 1 value then returns it, otherwise returns 'N'.


I wrote the below script which satisfies the first if condition, but not the 2nd if(). Please help me with the where condition or some technique where i can fetch the right data that above expression does.

Table:
load
id
field1;

sql select
id,
field1
from database
where type=isp ...??

1 Reply
bharath28
Creator
Creator
Author

Any inputs on this..please