Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
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
OmarBenSalem
Partner - Champion II
Partner - Champion II

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;

View solution in original post

10 Replies
Anonymous
Not applicable
Author

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] ,

OmarBenSalem
Partner - Champion II
Partner - Champion II

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
Author

Ok thank you for that,

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

Not applicable
Author

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

Anonymous
Not applicable
Author

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

OmarBenSalem
Partner - Champion II
Partner - Champion II

That's what I'm doing :

Capture.PNG

Not applicable
Author

Thanks for that,,,it worked

Not applicable
Author

un.png

Page numbers are skipped!!!

OmarBenSalem
Partner - Champion II
Partner - Champion II

Go under aspect , x-axis:

Capture.PNG