Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

Treat .1 & .10 differently

Hi all ,

I have a strange problem. I am creating a dashboard for some survey.

Now the survey has Question & SubQuestion.

So for example

Question     SubQuestion

1                 1

1                 2

1                 10

1                 11

I wish to represent the Question Number as 1.1, 1.2, 1.3, 1.10 format but when I concatenate Question & Sub Question it interprets it as numbers and shows both "1.1" & "1.10" as 1.1. Using Text or any function is of no user. Can anyone suggest what should I do?

Thanks in advance.

Amar

1 Solution

Accepted Solutions
tresesco
MVP
MVP

This?

Load      *,

            Text(Question&'.'&SubQuestion) as New

Capture.PNG

View solution in original post

9 Replies
goro2010
Creator
Creator

Good Day,

On you load use a combine function.

Example:

Question & '-' & SubQuestion as TotalQuestion


Thank You

tresesco
MVP
MVP

This?

Load      *,

            Text(Question&'.'&SubQuestion) as New

Capture.PNG

amars
Specialist
Specialist
Author

Thanks for the reply Jan,

I know that changing the separator will solve the issue.

When displaying the data values I wish to show them as Index and thus want to use "." & not "_".

Any other suggestions?

vinieme12
Champion III
Champion III

you already have the answer to your question

load text(Question&'.'&SubQuestion) as Combined inline [

Question,SubQuestion

1,1

1,2

1,10

1,11

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
goro2010
Creator
Creator

Try below as suggested by Tresesco.

avinashelite

You need to convert your SubQuestion to text in the script level then you could resolve this


LOAD * ,

Text(SubQuestion) as New_SubQuestion

from


then combine the two fields ..this will solve your problem

antoniotiman
Master III
Master III

Hi Michael,

I don't notice this issue

LOAD *,Question&'.'&SubQuestion as A Inline [
Question SubQuestion
1 1
1 2
1 10
1 11
]
(delimiter IS
SPACES);

However try

Question&'.'&Text(SubQuestion) as Field

Regards,

Antonio

amars
Specialist
Specialist
Author

Thanks a lot Tresesco. Will try this one

Kushal_Chawda

this should work

text(Question&'.'&SubQuestion)  as QuestionNew