Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sakamsureshbabu
Creator
Creator

how to filter values from field

Hi All,

I have data like below

model:

Modelcost
Nokia-att45
lumia-at&t73
Samsung 34
lg-airtel32
Sony65
micro max32

where i want to create one more field that should have only '-'

 

Modelcost
Nokia-att45
lumia-at&t73
lg-airtel32

i need like this how can i create.

Thanks ...........

8 Replies
MK_QSL
MVP
MVP

LOAD Model,

     cost,

     If(SubStringCount(Model,'-')>0,1,0) as Flag

FROM

[https://community.qlik.com/thread/197647]

(html, codepage is 1252, embedded labels, table is @1);

Now create a Straight Table

Dimension

Model

Expression

SUM({<Flag = {1}>}cost)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Or without changing your script at all:

=sum({<Model = {'*-*'}>} Cost)

The set analysis reduces the list of Dimension values in the current object to those that contain a hyphen.

Best,

Peter

Anonymous
Not applicable

may be like this at script like:

LOAD Model,

     cost,

     If(Model like '*-*', Model) as NewModel

FROM

[https://community.qlik.com/thread/197647]

(html, codepage is 1252, embedded labels, table is @1);

Now take NewModel as a dimension, hope this will help!!

veidlburkhard
Creator III
Creator III

Hi Suresh,

below see how to adjust your script to get the new field you want to use and what to achieve with that in UI:

-Model.jpg

Hope this helps

Burkhard

sakamsureshbabu
Creator
Creator
Author

Hi Manish,

Tanks.

sakamsureshbabu
Creator
Creator
Author

Hi Peter,

Thanks.

sakamsureshbabu
Creator
Creator
Author

Hi Balraj,

Thanks.

sakamsureshbabu
Creator
Creator
Author

Hi Burkhard,

Thanks for your explanation,i got it some another way.

Both are working.