Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ...??
Any inputs on this..please