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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Cyclic Group

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

1 Solution

Accepted Solutions
Not applicable

Let's say your table is TravelData:

// Add unique ID to Arrival + Departures combinations

LEFT JOIN (TravelData)

LOAD DISTINCT Arrival, Departures, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

// New table with the combination of Arrival and Departures

AD:

LOAD DISTINCT Arrival as AD_Name, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

LOAD DISTINCT Departures as AD_Name, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

// Now just add AD_Name to your cycle group

View solution in original post

4 Replies
Not applicable

Let's say your table is TravelData:

// Add unique ID to Arrival + Departures combinations

LEFT JOIN (TravelData)

LOAD DISTINCT Arrival, Departures, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

// New table with the combination of Arrival and Departures

AD:

LOAD DISTINCT Arrival as AD_Name, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

LOAD DISTINCT Departures as AD_Name, autonumber(Arrival & Departures) as AD_KEY

RESIDENT TravelData;

// Now just add AD_Name to your cycle group

n1ef5ng1
Creator
Creator
Author

Thanks for the reply,

apparently both of the fields comes from different table. 

namely, market_classification_arrival

and

market_classification_departure

Not applicable

If you want an appropiate answer, you have to provide the context.

Anyway, I believe the answer is to create a combination of the points in the script.

n1ef5ng1
Creator
Creator
Author

my bad about this, till date I have not edit the script before so I have no idea how powerful it is.

Hope you dun mind.