Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

sahajaqlik
Contributor

need help in qlikview logic

I have field value called

 

IBM-CONTENT-NAVIGATOR
IBM-CONTENT-NAVIGATOR-CONT
IBM-CONTENT-NAVIGATOR-DEV
IBM-CONTENT-NAVIGATOR-UAT

 

I need the value like

IBM-CONTENT-NAVIGATOR

 

I have wriiten the logic in qlik as

UPPER(IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'CONT', SubField(Depedent_CI_NAME,'-CONT',1),
IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'DEV', SubField(Depedent_CI_NAME,'-DEV',1) ,
IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'UAT', SubField(Depedent_CI_NAME,'-UAT',1),Depedent_CI_NAME)))) as Depedent_CI_NAMES

I

I am not getting proper result

I am geeting like IBM

CAn anyone please help

 

 

 

8 Replies
sahajaqlik
Contributor

Re: need help in qlikview logic

Can anyone please help
Frank_Hartmann
Honored Contributor II

Re: need help in qlikview logic

maybe this:

 

subfield(YOURFIELD,'-',1)&'-'&subfield(YOURFIELD,'-',2)&'-'&subfield(YOURFIELD,'-',3) as new_Field

 

sasiparupudi1
Honored Contributor III

Re: need help in qlikview logic

x:
Load
IF(SubStringCount(A,'-')=3,Left(A,Index(A,'-',3)-1),A) AS AA,
A;
Load * Inline
[
A
IBM-CONTENT-NAVIGATOR
IBM-CONTENT-NAVIGATOR-CONT
IBM-CONTENT-NAVIGATOR-DEV
IBM-CONTENT-NAVIGATOR-UAT
];

sahajaqlik
Contributor

Re: need help in qlikview logic

It is working only for that particular value(IBM-CONTENT) only.

 i have thousands of fields in which -CONT will come last, i need to remove the last 4/3 letters which are ending with

-CONT,-DEV and -UAT .

i have thousands of names lke this

example1:

3DAYS-BPM-CONT     == i want to remove CONT here  

example2:

 

if 2FA-STRONG-AUTHENTICATION-HBFR-DEV id there i want to remove DEV  here

Can anyone please help.

 

 

i have written like this

UPPER(IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'CONT', SubField(Depedent_CI_NAME,'-CONT',1),
IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'DEV', SubField(Depedent_CI_NAME,'-DEV',1) ,
IF
(
SubField(Depedent_CI_NAME,'-',-1) = 'UAT', SubField(Depedent_CI_NAME,'-UAT',1),Depedent_CI_NAME)))) as Depedent_CI_NAMES

 

But

 

 

sasiparupudi1
Honored Contributor III

Re: need help in qlikview logic

May be try

x:
Load
If(Match(SubField(A,'-',-1),'DEV','CONT','UAT')>0,Left(A,Index(A,'-',-1)-1),A) As AA,
A;
Load * Inline
[
A
IBM-CONTENT-NAVIGATOR
IBM-CONTENT-NAVIGATOR-CONT
IBM-CONTENT-NAVIGATOR-DEV
IBM-CONTENT-NAVIGATOR-UAT
2FA-STRONG-AUTHENTICATION-HBFR-DEV
3DAYS-BPM-CONT
];

sahajaqlik
Contributor

Re: need help in qlikview logic

HI

By my logic

=PICK( MATCH(SubField(UPPER(Depedent_CI_NAME),'-',-1), 'DEV', 'UAT','CONT'),
SubField(Depedent_CI_NAME,'-DEV'),
SubField(Depedent_CI_NAME,'-UAT'),
SubField(Depedent_CI_NAME,'-CONT'), Depedent_CI_NAME)

example:

ACCESS-CONTROL-CHECK-IN-SYSTEM-ITALY-CONT

 

i am getting the name  as ACCESS only

 

 why because it is taking ACCESS-CONTROL and here itslf it is taking as ACCESS

but i need as ACCESS-CONTROL-CHECK-IN-SYSTEM-ITALY

 

 

 

sra1urs
New Contributor

Re: need help in qlikview logic

Hi try the below one, it will work

temp:

load * ,

if(Right(AA,5)='CONT1' , Replace (AA,'-CONT1',''),

if(Right(AA,3)='DEV', Replace(AA,'-DEV',''),

if(Right(AA,3)='UAT', Replace(AA,'-UAT',''),

AA))) as AAA

;

Load

if(Right(A,4)='CONT', A&'1',A) as AA ;

Load * Inline [

A

IBM-CONTENT-NAVIGATOR

IBM-CONTENT-NAVIGATOR-CONT

IBM-CONTENT-NAVIGATOR-DEV

IBM-CONTENT-NAVIGATOR-UAT

3DAYS-BPM-CONT

2FA-STRONG-AUTHENTICATION-HBFR-DEV

];

sahajaqlik
Contributor

Re: need help in qlikview logic

hi sasi

thnks for help.