Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am trying to create a new field from the existing field in the datamodel using Subfield function.
The field is separated by ; and there is no limit in adding the contents inside.
Hence I have used Subfield(Field_name,';) as Newfield and this gives correct results.
However when I try to create the statistics box which should show the number of records in my database/user selected it is giving more numbers than what is available.Then I realized that the numbers are from the above formula which adds more rows.
Could you please suggest me if we have a easy way.
Thanks & Regards
Jeba
table1:
LOAD allyourotherfields,
Field_name,
Autonumber(Field_name) as %ID
FROM source;
tableSubfields:
LOAD %ID,
Subfield(Field_name,';') as Newfield
Resident table1;
TRY BELOW ONE
Subfield(Field_name,';',1) as Newfield
Hi Manish,
That separates only one field like below
Jeba;Malai - It displays as Jeba and Malai
Jeba;Malai;Dass - This is not working based on the above logic
Regards
Jeba
Hi,
use an unique id or use distinct key word in your expression to show the number of records in your database.
Subfield(Field_name,';',n) as Newfield n=1,2,3,4....
abc;cde;efg;ghi;ijk
subfield('abc;cde;efg;ghi;ijk',';',1) ----------------------->abc
subfield('abc;cde;efg;ghi;ijk',';',2) ----------------------->cde
subfield('abc;cde;efg;ghi;ijk',';',3) ----------------------->efg
subfield('abc;cde;efg;ghi;ijk',';',4) ----------------------->ghi
subfield('abc;cde;efg;ghi;ijk',';',5) ----------------------->ghi
or share sample
for Jeba;Malai;Dass
subfield(Fieldname,';',1) Results in Jeba
subfield(Fieldname,';',2) Results in Malai
subfield(Fieldname,';',3) Results in Dass
hope this helps
table1:
LOAD allyourotherfields,
Field_name,
Autonumber(Field_name) as %ID
FROM source;
tableSubfields:
LOAD %ID,
Subfield(Field_name,';') as Newfield
Resident table1;
Hi,
Check this
Table:
LOAD
String,
SubField(String,';') as SubNewString;
Load * inline [
String
Jeba;Malai;Dass ];
Provide sample data.
Regards
Anand
Hi Marco,
This works perfect and thanks a lot.
Regards
Jeba