Forum Discussion
New customized column
The following database has the shipment number, the barge plate and the date the barge was shipped. The shipment number is unique and can be repeated but for the date it was shipped, the barge plate is also repeated and can be repeated on different dates. I need to create a new column that identifies the barge plate and says "Yes" when it was last date it was shipped and "No" the other rows for the old shipments assigned to the barge plate.
- Anonymous3 years ago
Hi Rada137 ,
Here are the steps you can follow:
1. In Power Query -- Add Column – Index Column – From 1.
2. Create calculated column.
Column = var _Index= MAXX(FILTER(ALL('Table'),'Table'[shipment]=EARLIER('Table'[shipment])&&'Table'[plate]=EARLIER('Table'[plate])&&'Table'[shipDate]=EARLIER('Table'[shipDate])),[Index]) return IF( 'Table'[Index]=_Index,"Yes","No")3. Result:
Whether it meets your expected results, if not, you can represent your expected results in the form of pictures, and we can help you better.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
1 Reply
- AnonymousNot applicable
Hi Rada137 ,
Here are the steps you can follow:
1. In Power Query -- Add Column – Index Column – From 1.
2. Create calculated column.
Column = var _Index= MAXX(FILTER(ALL('Table'),'Table'[shipment]=EARLIER('Table'[shipment])&&'Table'[plate]=EARLIER('Table'[plate])&&'Table'[shipDate]=EARLIER('Table'[shipDate])),[Index]) return IF( 'Table'[Index]=_Index,"Yes","No")3. Result:
Whether it meets your expected results, if not, you can represent your expected results in the form of pictures, and we can help you better.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly