Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

starts with QV

Hello,

What is the synonym of start by function in qlikview?

If (CDR start by:5, MARKETING EXPENSES, ADMIN OPEX)

Thanks

1 Solution

Accepted Solutions
rubenmarin

Sorry, my last answer was wrong, I didn't counted the option to maintain the value, it can be:

If(Len(Trim(OpEx_Category))>0, OpEx_Category, //If Opexcategory has a value, keep the value

If(WildMatch(CDR, '5*'), 'MARKETING EXPENSES', //If doesnt' have a value, check the start of CDR to set the value

  'ADMIN OPEX'))

View solution in original post

24 Replies
tresesco
MVP
MVP

What does 'start by' do here? Could you please explain your expected output here? May be a qv solution could be suggested then.

migueldelval
Specialist
Specialist

Hi master_student,

What dou you want to say with "start by"?. Maybe you can try CDR={"5*"}, but I´m not sure if this it´s correct for you. Try to explain it.

Regards

rubenmarin

I don't know what that 'start by' does. It checks if CDR starts by the character '5'?

In  that case instead of 'CDR start by:5' you can use:

- WildMatch(CDR, '5*')

- Left(CDR, 1)='5'

- CDR like '5*'

awhitfield
Partner - Champion
Partner - Champion

Sorry, but t's really not clear what you mean here. can you expand on your requirements?

Andy

master_student
Creator III
Creator III
Author

if the cdr field strats with the character 5. and I need it in an if statment like that :

If (CDR start with the character :5, then opex =MARKETING EXPENSES else  opex=ADMIN OPEX)

master_student
Creator III
Creator III
Author

if the cdr field strats with the character 5. and I neesd it in an if statment like that :

If (CDR start with the character :5, then opex =MARKETING EXPENSES else  opex=ADMIN OPEX)


Thanks

rubenmarin

Ok, have you tried the options above? In example:

If (WildMatch(CDR, '5*'), MARKETING EXPENSES, ADMIN OPEX)

migueldelval
Specialist
Specialist

Hi master_student,

I think that rubenmarin‌‌ gave you the correct answer, only you need to add ' to the expression.

=If (WildMatch([texto], '5*'), 'MARKETING EXPENSES', 'ADMIN OPEX')

Regards

Miguel

master_student
Creator III
Creator III
Author

=If (WildMatch([CDR], '5*'), 'opexcategory= MARKETING EXPENSES',opexcategory= 'ADMIN OPEX')


opexcategory is anthoer field


is that correct?