Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Combine two field from two different table

Hi all,

I have a cyclic group that consist of two field, Arrival and Departure.

Arrival means Point A to Point B, Point B could be many places

Departure means from Point B to Point A.

User are able to select the arrival and departure location to retrieve the data.

However, I would like to create a custom new field on the cyclic group for to and fro,

therefore if user choose France, it basically means total France trip inregardless of arrival and departure.

However I do not have any fields for to and fro in my database

Is there any way I can add to the cyclic group that add Arrival + Departure?

Thank you very much

*Both arrival and departure comes from different table namely Market_Classification_Arrival and Market_Classification_Departure

8 Replies
n1ef5ng1
Creator
Creator
Author

any help

sivarajs
Specialist II
Specialist II

Market_Classification_Arrival&'-'&Market_Classification_Departure as New_Field

n1ef5ng1
Creator
Creator
Author

Under market_Classification_arrival table consist of arrival field

and

Under market_Classification_departure table consist of departure field

I have not edit any code before, is it possible if you can guide me through, thanks alot

Not applicable

Hi,

This would be done at frontend where you need to combine two fields using "&"  under the Calculated dimension.

But this will impact your chart performance.

You could also do this activity at back end using joins depending on ur data model build up.

Regards,

Nitin Jain

n1ef5ng1
Creator
Creator
Author

whats the code that I should put on the calculated dimension? I tried to put "&" on calculated dimension but it is not working

Will be better if I can edit without editing script though

parthiband
Partner - Creator
Partner - Creator

Aggr(Market_Classification_Arrival&'-'&Market_Classification_Departure,

Market_Classification_Arrival,

Market_Classification_Departure)

in Calculated Dimension

It ll Work

n1ef5ng1
Creator
Creator
Author

Thanks for the code.

However this code only calculate the trips made from Indonesia to Indonesia

My desire output is from indonesia to anywhere in the world

+

Anywhere in the world to indonesia

n1ef5ng1
Creator
Creator
Author

anybody know the reason?