Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create an expression that only reports back CODES that begin with "S"

I am sorry for the newby question, but I want to report back only an Estimate Code that begins with "S". See attached, I only want S000xxx to appear when I have the Sheet open. I have other codes that begin with P and M, but want to exclude.

What would be the expression? If I am asking the correct question...

Thanks

7 Replies
devarasu07
Master II
Master II

Hi Chris,

Try below methods

Method1:

Try like below in your script,

Data:

LOAD * INLINE [

Product,Qty

    S000029, 100

    S000030, 60

    S000011, 50

    P000068, 70

    P000012, 19

    M000128, 120

Where not WildMatch(Product,'P*','M*');


method 2:


If you wanted to do in your presentation end, then try like below,

in your dimension (add new calculated dimension and enable check box for suppress null value)

=pick(Wildmatch(Product,'S*'),Product)


Hope this helps you


Regards,

Deva

Not applicable
Author

Hi,

If you want to display product values consisting 'S000' when you open the sheet then

go to setting ---> sheet properties-->edit actions under on activating sheet-->  add-->select in field-->enter field as Product and value as S000*

Thanks

rahulpawarb
Specialist III
Specialist III

Hello Chris,

I agree with Devarasu! Meanwhile you can use below front-end expression:

=If(Left(Product, 4) ='S000', Product)

Hope this will be helpful.

Regards!

Rahul

Anil_Babu_Samineni

Or

one more solution could be this

Script:

Data:

LOAD * INLINE [

Product,Qty

    S000029, 100

    S000030, 60

    S000011, 50

    P000068, 70

    P000012, 19

    M000128, 120

Where WildMatch(Product,'S000*');


Or


Front-End:

Only({<Product = {'S000*'} >} Product)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sasiparupudi1
Master III
Master III

Use triggers .

Please see attached qvw .

hth

Sas

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Go to Sheet Properties,

Add Action - > Select in Field,

Field -> EstimationCode

Search String -> S*

Muthukumar Pandiyan
Not applicable
Author

Hi,

sorry for the mistake in the last post try this:

If you want to display product values consisting 'S000' when you open the sheet then

go to setting ---> sheet properties-->Triggers-->edit actions under on activating sheet-->  add-->select in field-->enter field as Product and value as S000*

Thanks