Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Adding two fields into one

Dear Experts,

i have region dimension in this i have two separate fields

Asia and Japan these two fields i want to make it One filed

How can i do this

Thanks In Advance

Niranjan

1 Solution

Accepted Solutions
martynlloyd
Partner - Creator III
Partner - Creator III

Hi Niru,

You were so close, but the values of Level 3 are Text, not field names, so no [ ]

IF(([Level 3]='IM Asia ex Japan Ops' or [Level 3]='IM Japan Ops','IM Asia Includs Japan Ops',[Level 3]) as [Level 3],

Regards,

M

View solution in original post

8 Replies
ecolomer
Master II
Master II

Use this function:

'Asia' &'-'&'Japon' as XX

with fields...

Continent & '-'& Pays

MK_QSL
MVP
MVP

Can you elaborate little more what is meant by two fields into one...?

If you want to merge data where Region is Japan and Asia, consider below case...

Sales:

Load

  If(Region = 'Japan','Asia', Region) as Region,

  Sales

Inline

[

  Region, Sales

  Asia, 100

  Japan, 120

  India, 140

  USA, 200

  UK, 140

];

or

If(Region = 'Asia','Japan', Region) as Region,

NavinReddy
Creator II
Creator II
Author

Hi Enrique,

How can i write script wise

Give me some example

Regards,
Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Manish,

I want to do Merge and i need to rename it also

Ex:   'Asia' &'-'&'Japon' as Asia Include Japan

Regards,
Niranjan

MK_QSL
MVP
MVP

Temp:

Load

  If(Region = 'Asia' or Region = 'Japan','Asia-Japan', Region) as Region,

  Sales

Inline

[

  Region, Sales

  Asia, 100

  Japan, 120

  India, 140

  USA, 200

  UK, 140

];

NoConcatenate

Final:

Load

  Region,

  SUM(Sales) as Sales

Resident Temp Group By Region;

Drop Table Temp;

NavinReddy
Creator II
Creator II
Author

Hi Manish,

I tried but its not working Please find the attachment

Regards,
Niranjan

martynlloyd
Partner - Creator III
Partner - Creator III

Hi Niru,

You were so close, but the values of Level 3 are Text, not field names, so no [ ]

IF(([Level 3]='IM Asia ex Japan Ops' or [Level 3]='IM Japan Ops','IM Asia Includs Japan Ops',[Level 3]) as [Level 3],

Regards,

M

NavinReddy
Creator II
Creator II
Author

Hi Martyn,

Thank you so much its working fine