Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Expression Help

Hi,

I would appreciate some help with the below expression.

I have the following data:

Vessel Name          Act           Port

Dan123                   L              UK

Dan123                   D              France

I would like to create a table that show the data as:

Vessel Name          Load Port             Discharge Port

Dan123                   UK                       France

I thought I could use If(Act='L',Port), but it didn't work.

Thanks,

Daniel

1 Solution

Accepted Solutions
rubenmarin

Hi Daniel, have you tried?:

Only({<Act={'L'}>} Port)

or "Concat(distinct {<Act={'L'}>} Port, ', ')" if Vessel Name can have more than one port for Act='L'

View solution in original post

11 Replies
Anil_Babu_Samineni

May be create table

Dimension

1) [Vessel Name]

2) Pick(Match(Act, 'L', 'D'), 'Load Port', 'Discharge Port')


Expression

1) Port


Finally, Drag column to Row from second dimension

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danielnevitt
Creator
Creator
Author

Thanks Anil.

I tried the above, however the data appears on two lines.  Is it possible to present the data on one line?

Thanks,

Daniel

Anil_Babu_Samineni

Looks like working?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danielnevitt
Creator
Creator
Author

Are you able to post your example?

Thank you for your help.

Regards,

Daniel

Anil_Babu_Samineni

Why Not? PFA

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danielnevitt
Creator
Creator
Author

Thanks Anil.

That now works perfectly.  However I have an issue with the format when I try to add additional fields like voyagenumber, charterer etc

Is this possible with this style of table?

Regards,

Daniel

Anil_Babu_Samineni

Please share the Layout which you currently having?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danielnevitt
Creator
Creator
Author

Hi Anil,

I have attached the underlying data.  The first tab 'Voyages' shows the current format and the 'Required Format' tab is how I would like to present this data.

Thanks,

Daniel

Digvijay_Singh

If your data is more complex then you should use the generic load which is made to solve this kind of problem. It converts field attributes into field name which helps to create tables which you are trying to build.

Table1:

Load * inline [

Vessel Name,          Act ,          Port


Dan123  ,                L    ,          UK


Dan123  ,                D  ,          France ];


Generic

Load *

Resident Table1;



Capture.PNG