Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
dmxmikey
Creator
Creator

maxstring to return data if contains Y

mike3.JPG

Im trying to return word Egg on my table on Field that says Y and Blank if its N of blank.

Database contains Y,N and blank

11 Replies
Anil_Babu_Samineni

This is the case, I don't think whether you need MaxString(). Why not simply IF condition without MaxString() function

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

Where exactly are you using Y, N? on which field I mean?

dmxmikey
Creator
Creator

The Y,N is the alg-stat

dmxmikey
Creator
Creator

sorry how will the if command look like?

sunny_talwar

But you are testing for values such as GLUT, EGG against alg-stat? Does it contain both?

Anil_Babu_Samineni

My intention is this?

Load Distinct [p-code],

[alg-code],

If(Match([alg-code],'GLUT','EGG','CRUS'), 'Y', 'N') as Flag

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
dmxmikey
Creator
Creator

Alg-code
CakeY
cokeN

the data looks like this on Database, where Y,N are Alg-stat,

so what i need to achieve is where Y i need it to say Egg and N to be blank. This is just for the Egg Alg-code

dmxmikey
Creator
Creator

Alg-code
CakeY
cokeN

the data looks like this on Database, where Y,N are Alg-stat,

so what i need to achieve is where Y i need it to say Egg and N to be blank. This is just for the Egg Alg-code

Anil_Babu_Samineni

May be this?

Load Distinct [p-code], If([Alg-code]='Y', 'Egg', 'Blank') as Egg;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)