Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Not applicable

Converting data in field with number formatting

Hello All

I need to convert the data in the filed(last_accessed_page),

for example data in the field(last_accessed_page )are like,

last_accessed_page

1,1,1

1,1,2

1,1,3

(Above 1,1,1 specifies page number=1)

i need to format this  and display it like 1,2,3

sub.png

dimension:

last_accessed_page

measure:

Count({<subject_status={'incomplete'}>}last_accessed_page)

Data Load Editor:

LOAD `subject_access_track_id`,

    `subject_name`,

    `client_id`,

    `lender_offer_id`,

    `subject_status`,

    last_accessed_page;

SQL SELECT `subject_access_track_id`,

    `subject_name`,

    `client_id`,

    `lender_offer_id`,

    `subject_status`,

    `last_accessed_page`

FROM SUBJECTACCESSTRACKING;

1 Solution

Accepted Solutions
Partner
Partner

Re: Converting data in field with number formatting

load *, SubField(last_accessed_page,',',3) as NewField;

LOAD `subject_access_track_id`,

    `subject_name`,

    `client_id`,

    `lender_offer_id`,

    `subject_status`,

    last_accessed_page;

10 Replies

Re: Converting data in field with number formatting

Using the subfield function on '1,1,2' returns just the last character of 2

     subfield( '1,1,2' , ',' , 3 )

So maybe in your load script maybe use something like :

     subfield(last_accessed_page,',',3)      as     [Page Number] ,

Partner
Partner

Re: Converting data in field with number formatting

load *, SubField(last_accessed_page,',',3) as NewField;

LOAD `subject_access_track_id`,

    `subject_name`,

    `client_id`,

    `lender_offer_id`,

    `subject_status`,

    last_accessed_page;

Not applicable

Re: Converting data in field with number formatting

Ok thank you for that,

but instead of   subfield(last_accessed_page,',',3)  (ie instead of 3 can i place #)

Not applicable

Re: Converting data in field with number formatting

Sorry i think u understood in other way,

last_accessed_page 

1,1,1

1,1,2

1,1,3

It should be

1

2

3

Re: Converting data in field with number formatting

Give it a try.  I think I understand your needs and my suggestion should work.

Partner
Partner

Re: Converting data in field with number formatting

That's what I'm doing :

Capture.PNG

Not applicable

Re: Converting data in field with number formatting

Thanks for that,,,it worked

Not applicable

Re: Converting data in field with number formatting

un.png

Page numbers are skipped!!!

Partner
Partner

Re: Converting data in field with number formatting

Go under aspect , x-axis:

Capture.PNG