Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have data like below
model:
Model | cost |
---|---|
Nokia-att | 45 |
lumia-at&t | 73 |
Samsung | 34 |
lg-airtel | 32 |
Sony | 65 |
micro max | 32 |
where i want to create one more field that should have only '-'
Model | cost |
---|---|
Nokia-att | 45 |
lumia-at&t | 73 |
lg-airtel | 32 |
i need like this how can i create.
Thanks ...........
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)
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
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!!
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:
Hope this helps
Burkhard
Hi Manish,
Tanks.
Hi Peter,
Thanks.
Hi Balraj,
Thanks.
Hi Burkhard,
Thanks for your explanation,i got it some another way.
Both are working.