# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

## If expression checking if the field starts with some letters

Hey everyone,

I would like to know how to write a expression that will check if a particular expression start with the given letters.

For example i would like to check if my [Project Name] field starts with "CPM_" .

I don't know how to express this.

1 Solution

Accepted Solutions
MVP

## Re: If expression checking if the field starts with some letters

Hi

Try like this

= Count({<ProjectName = {'CPM_*'}>}Sales)

Or

If(WildMatch(ProjectName,'CPM_*'), ProjectName)

Hope that helps

4 Replies
MVP

## Re: If expression checking if the field starts with some letters

Hi

Try like this

= Count({<ProjectName = {'CPM_*'}>}Sales)

Or

If(WildMatch(ProjectName,'CPM_*'), ProjectName)

Hope that helps

MVP

## Re: If expression checking if the field starts with some letters

Arnaud

Use the WILDMATCH function.

Best Regards,     Bill

MVP

## Re: If expression checking if the field starts with some letters

Use WildMatch

WildMatch([Project Name], 'CPM_*')

Not applicable

## Re: If expression checking if the field starts with some letters

Thank all of you for you help.

I used this expression : sum(If(WildMatch([Project Name],'CPM_*'),1,0))  to know the number of projects starting with CPM_.